Ejemplo n.º 1
0
 def __init__(self, parentState, text, pos, size=32, fixed=True):
     StaticImage.__init__(self, None, None, parentState, fixed)
     self.labelText = pygame.font.Font(os.path.join("data", "fonts", "PD-tarzeau_-_Atari_Small.ttf"), size)
     self.text = text
     self.image = self.labelText.render(text, False, pygame.Color(0, 0, 0))
     self.rect = self.image.get_rect()
     self.rect.topleft = pos
Ejemplo n.º 2
0
 def __init__(self, parentState, text, pos, size=32, fixed=True):
     StaticImage.__init__(self, None, None, parentState, fixed)
     self.labelText = pygame.font.Font(
         os.path.join("data", "fonts", "PD-tarzeau_-_Atari_Small.ttf"),
         size)
     self.text = text
     self.image = self.labelText.render(text, False, pygame.Color(0, 0, 0))
     self.rect = self.image.get_rect()
     self.rect.topleft = pos
Ejemplo n.º 3
0
 def __init__( self, image, pos, parentState=None, fixed=False ):
     StaticImage.__init__( self, image, pos, parentState, fixed )
Ejemplo n.º 4
0
 def __init__( self, rect, parentState ):
     StaticImage.__init__( self, None, None, parentState )
     self.image = pygame.Surface( ( rect.w, rect.h ) ).convert_alpha()
     self.image.fill( self.empty )
     self.rect = rect.copy().move( -parentState.x, -parentState.y )
     pygame.draw.rect( self.image, self.red, self.rect.move( -(self.rect.left), -(self.rect.top) ), 2 )
Ejemplo n.º 5
0
 def __init__(self, image, pos, parentState=None, fixed=False):
     StaticImage.__init__(self, image, pos, parentState, fixed)