Exemplo n.º 1
0
    def __init__(self,
                 width,
                 height,
                 pokemon=None,
                 pokemonMenuEntry=None,
                 showHP=True):
        """ Initialize the Pokemon Stats View """
        if pokemon is not None:
            self.pokemon = pokemon
            pokemonMenuEntry = PokemonMenuEntry(self.pokemon, None)
        else:
            self.pokemon = pokemonMenuEntry.getPokemon()
        MenuEntryWidget.__init__(self,
                                 pokemonMenuEntry,
                                 width,
                                 height,
                                 fontSize=self.FONT_SIZE)

        self.showHP = showHP
        self.setLevelLabel()
        self.setHealthLabel()
        self.healthBarView = HealthBarView(self.pokemon, width, height * .1)