コード例 #1
0
 def __init__(self, width, height):
     """ Initialize the widget """
     SizedWidget.__init__(self, width, height)
     self.background = GetTransparentSurface(width-6, height-6)
     self.background.fill((3, 60, 176, 127))
     self.horizontalBar = Surface((width-6, 4))
     self.verticalBar = Surface((4, height-6))
コード例 #2
0
 def __init__(self, side, width, height):
     """ Initialize the Battle Side View """
     SizedWidget.__init__(self, width, height)
     self.side = side
     self.pokemonStatsView = PokemonStatsView(self.width*.4, self.height*.9,
                                              self.side.pkmnInPlay[0], showHP=self.shouldShowHP())
     self.setPokemonImage()
コード例 #3
0
 def __init__(self, width, height):
     """ Initialize the widget """
     SizedWidget.__init__(self, width, height)
     self.background = GetTransparentSurface(width - 6, height - 6)
     self.background.fill((3, 60, 176, 127))
     self.horizontalBar = Surface((width - 6, 4))
     self.verticalBar = Surface((4, height - 6))
コード例 #4
0
 def __init__(self, side, width, height):
     """ Initialize the Battle Side View """
     SizedWidget.__init__(self, width, height)
     self.side = side
     self.pokemonStatsView = PokemonStatsView(self.width * .4,
                                              self.height * .9,
                                              self.side.pkmnInPlay[0],
                                              showHP=self.shouldShowHP())
     self.setPokemonImage()
コード例 #5
0
    def __init__(self, width, height, message, fullyDisplay=False):
        """ Builds the Message Box with the given message box """
        SizedWidget.__init__(self, width, height)
        self.message = message
        self.charsShown = 0
        self.font = pygame.font.SysFont("Times New Roman", 36)
        self.stringToDisplay = ""

        self.background = MenuBackgroundWidget(self.width, self.height)

        if fullyDisplay:
            self.showFully()
コード例 #6
0
ファイル: message_box.py プロジェクト: cloew/Pokemon-Project
 def __init__(self, width, height, message, fullyDisplay=False):
     """ Builds the Message Box with the given message box """
     SizedWidget.__init__(self, width, height)
     self.message = message
     self.charsShown = 0
     self.font = pygame.font.SysFont("Times New Roman", 36)
     self.stringToDisplay = ""
     
     self.background = MenuBackgroundWidget(self.width, self.height)
     
     if fullyDisplay:
         self.showFully()
コード例 #7
0
 def __init__(self, entry, width, height, fontSize=36):
     """ Sets the entry's text """
     SizedWidget.__init__(self, width, height)
     self.mainLabel = Label(entry.getText(), size=fontSize)
     self.entry = entry
コード例 #8
0
 def __init__(self, entry, width, height, fontSize=36):
     """ Sets the entry's text """
     SizedWidget.__init__(self, width, height)
     self.mainLabel = Label(entry.getText(), size=fontSize)
     self.entry = entry
コード例 #9
0
ファイル: tile_widget.py プロジェクト: cloew/Pokemon-Project
 def __init__(self, tile):
     """ Initialize the widget """
     SizedWidget.__init__(self, 16, 32)
     self.tile = tile
     self.tileImage = self.loadImage()
コード例 #10
0
 def __init__(self, menu, width, height, MenuEntryWidget=MenuEntryWidget):
     """ Initialize the widget """
     SizedWidget.__init__(self, width, height)
     self.menu = menu
     self.entries = self.buildEntryViews(MenuEntryWidget=MenuEntryWidget)
コード例 #11
0
 def __init__(self, battle, width, height):
     """ Initialize the Battle Message Box """
     SizedWidget.__init__(self, width, height)
     self.messageBox = MessageBox("")
     self.battle = battle
コード例 #12
0
 def __init__(self, battle, width, height):
     """ Initialize the Battle Message Box """
     SizedWidget.__init__(self, width, height)
     self.messageBox = MessageBox("")
     self.battle = battle
コード例 #13
0
 def __init__(self, pokemon, width, height):
     """  Initialize the Health Bar View """
     SizedWidget.__init__(self, width, height)
     self.pokemon = pokemon
コード例 #14
0
 def __init__(self, pokemon, width, height):
     """  Initialize the Health Bar View """
     SizedWidget.__init__(self, width, height)
     self.pokemon = pokemon
コード例 #15
0
 def __init__(self, tile):
     """ Initialize the widget """
     SizedWidget.__init__(self, 16, 32)
     self.tile = tile
     self.tileImage = self.loadImage()
コード例 #16
0
ファイル: menu_widget.py プロジェクト: cloew/Pokemon-Project
 def __init__(self, menu, width, height, MenuEntryWidget=MenuEntryWidget):
     """ Initialize the widget """
     SizedWidget.__init__(self, width, height)
     self.menu = menu
     self.entries = self.buildEntryViews(MenuEntryWidget=MenuEntryWidget)