Esempio n. 1
0
 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)
Esempio n. 2
0
 def buildIcon(self):
     """ Build and return the Icon Surface """
     iconSurface = pygame.Surface((32, 32))
     rawIconSurface = load_image(self.iconFilename)
     self.setTransparency(iconSurface, rawIconSurface)
     
     return iconSurface
Esempio n. 3
0
 def drawSurface(self):
     """ Draw the Widget """
     self.drawOnSurface(self.tileImage, left=0, bottom=1)
     if self.tile.contents is not None:
         contentsImage = load_image(
             GetImagePath(self.tile.contents.getImageBaseName()))
         self.drawOnSurface(contentsImage, left=0, bottom=1)
Esempio n. 4
0
 def loadImage(self):
     """ Load the tile image """
     if self.tile.tileFilename in self.filenameToImage:
         image = self.filenameToImage[self.tile.tileFilename]
     else:
         image = load_image(GetImagePath("Tiles/{0}.png".format(self.tile.tileFilename)))
         self.filenameToImage[self.tile.tileFilename] = image
     return image
Esempio n. 5
0
 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)
Esempio n. 6
0
 def loadImage(self):
     """ Load the tile image """
     if self.tile.tileFilename in self.filenameToImage:
         image = self.filenameToImage[self.tile.tileFilename]
     else:
         image = load_image(
             GetImagePath("Tiles/{0}.png".format(self.tile.tileFilename)))
         self.filenameToImage[self.tile.tileFilename] = image
     return image
Esempio n. 7
0
 def __init__(self, imageFilename, scaledSize=None):
     """ Initialize the Image by loading the Image File given """
     self.image = load_image(imageFilename)
     if scaledSize is not None:
         self.image = pygame.transform.scale(self.image, scaledSize)
Esempio n. 8
0
 def drawSurface(self):
     """ Draw the Widget """
     self.drawOnSurface(self.tileImage, left=0, bottom=1)
     if self.tile.contents is not None:
         contentsImage = load_image(GetImagePath(self.tile.contents.getImageBaseName()))
         self.drawOnSurface(contentsImage, left=0, bottom=1)
Esempio n. 9
0
 def setPokemonImage(self):
     """ Set the pokemon Image """
     self.pokemonImage = load_image("{0}.png".format(
         self.getBasePokemonImageName()))
Esempio n. 10
0
 def setPokemonImage(self):
     """ Set the pokemon Image """
     self.pokemonImage = load_image("{0}.png".format(self.getBasePokemonImageName()))
Esempio n. 11
0
 def __init__(self, imageFilename, scaledSize=None):
     """ Initialize the Image by loading the Image File given """
     self.image = load_image(imageFilename)
     if scaledSize is not None:
         self.image = pygame.transform.scale(self.image, scaledSize)