def __init__(self, battle): """ Builds the Battle View with the Battle """ PygameScreen.__init__(self) self.opponentView = OpponentSideView(battle.oppSide, self.width, self.height*.35) self.playerView = PlayerSideView(battle.playerSide, self.width, self.height*.35) self.bottomView = None self.battle = battle
def __init__(self, marathon): """ Initialize the Marathon Screen """ PygameScreen.__init__(self) self.marathon = marathon self.backgroundImage = load_image(GetImagePath("Marathons/Kanto_Gym_Leaders.jpg")) self.congratsLabel = Label("Congratulations! You Won!") self.descriptionLabel = Label(marathon.description)
def __init__(self, menu): """ """ PygameScreen.__init__(self) self.menu = menu self.commandLabels = [] self.keyLabels = [] for cmd in self.bindingsOrder: self.commandLabels.append(Label(self.menu.cmdStrings[cmd], bold=True)) self.keyLabels.append(Label(self.menu.keyBindings[cmd]))
def __init__(self, menu): """ """ PygameScreen.__init__(self) self.menu = menu self.entries = [] for entry in self.menu.entries: self.entries.append(MenuEntryWidget(entry, width=self.width, height=self.height/float(len(self.menu.entries)))) self.selectedIndex = 0 self.buildMessageBox()
def __init__(self, menu, currentPlayer): """ """ PygameScreen.__init__(self) self.currentPlayer = currentPlayer self.menu = menu self.logo = Logo() name = "None" if currentPlayer is not None: name = currentPlayer.fullname self.playerLabel = Label("{0}: {1}".format("Player", name), size=24, color=(0, 0, 0)) self.menuView = MainMenuWidget(menu)
def __init__(self, menu): """ Builds the Switch Menu with all Pokemon """ PygameScreen.__init__(self) self.menu = menu self.menuView = SwitchMenuWidget(menu, self.width, self.height) self.statViews = [] width = self.width*.9/self.menu.columns height = self.height*.9/self.menu.columns for entry in menu.entries: statView = PokemonStatsView(width, height, pokemonMenuEntry=entry) self.statViews.append(statView) self.menuView.entries = self.statViews
def __init__(self, menu): """ """ PygameScreen.__init__(self) self.menu = menu self.entries = [] for entry in self.menu.entries: self.entries.append( MenuEntryWidget(entry, width=self.width, height=self.height / float(len(self.menu.entries)))) self.selectedIndex = 0 self.buildMessageBox()
def __init__(self, menu, lastScreen): """ Initialize the screen """ PygameScreen.__init__(self) self.menuView = MenuWithBackgroundWidget(menu, self.width*.4, self.height) self.lastScreen = lastScreen
def __init__(self, lastScreen): """ Initialize the screen """ PygameScreen.__init__(self) self.lastScreen = lastScreen
def __init__(self, attacksMenu, lastScreen): """ Initialize the screen """ PygameScreen.__init__(self) self.attacksMenu = attacksMenu self.lastScreen = lastScreen
def __init__(self, menu, lastScreen): """ Initialize the screen """ PygameScreen.__init__(self) self.lastScreen = lastScreen self.messageBox = None self.menuView = MenuWithBackgroundWidget(menu, .15*self.width, .2*self.height)
def __init__(self, playerPerson, zone): """ Initialize the Zone Screen """ PygameScreen.__init__(self) self.playerPerson = playerPerson self.zone = zone
def __init__(self, menu, lastScreen): """ Initialize the screen """ PygameScreen.__init__(self) self.menuView = MenuWithBackgroundWidget(menu, self.width * .4, self.height) self.lastScreen = lastScreen
def __init__(self): """ Initialize the screen """ PygameScreen.__init__(self)
def __init__(self, message, lastScreen): """ Initialize the Message Box Screen """ PygameScreen.__init__(self) self.messageBox = MessageBox(self.width * .9, self.height * .3, message) self.lastScreen = lastScreen
def __init__(self, message, lastScreen): """ Initialize the Message Box Screen """ PygameScreen.__init__(self) self.messageBox = MessageBox(self.width*.9, self.height*.3, message) self.lastScreen = lastScreen