Ejemplo n.º 1
0
 def __init__(self, entry, width, height):
     """ Initialize the widget """
     MenuEntryWidget.__init__(self, entry, fontSize=28, width=width, height=height)
     self.entry = entry
     
     attack = self.entry.attack
     self.typeImage = TypeImage(attack.type)
     self.ppTextLabel = Label("PP", size=18)
     self.ppValuesLabel = Label("{0}/{1}".format(attack.currPowerPoints, attack.powerPoints), size=18)
Ejemplo n.º 2
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)
Ejemplo n.º 3
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)