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))
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()
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))
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()
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()
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
def __init__(self, tile): """ Initialize the widget """ SizedWidget.__init__(self, 16, 32) self.tile = tile self.tileImage = self.loadImage()
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)
def __init__(self, battle, width, height): """ Initialize the Battle Message Box """ SizedWidget.__init__(self, width, height) self.messageBox = MessageBox("") self.battle = battle
def __init__(self, pokemon, width, height): """ Initialize the Health Bar View """ SizedWidget.__init__(self, width, height) self.pokemon = pokemon