Ejemplo n.º 1
0
 def __init__(self, director, position, style, visible):
     Container.__init__(self, director, position, style, visible)
     self.button = ImageButton.ImageButton(self.director, (14, 248), style)
     Container.addWidget(self, self.button)
     self.title = 'Title'
     self.message = 'Message'
     self.tooltip = 'Tooltip'
     fullname = os.path.join(Constants.FONTS_DIR , 'neuropolitical.ttf')
     self.titleFont = pygame.font.Font(fullname, 19)
     self.textFont = pygame.font.Font(fullname, 16)
     self.tooltipFont = pygame.font.Font(fullname, 14)
Ejemplo n.º 2
0
 def __init__(self, director, position, style, visible):
     Container.__init__(self, director, position, style, visible)
     self.button = ImageButton.ImageButton(self.director, (14, 248), style)
     Container.addWidget(self, self.button)
     self.title = 'Title'
     self.message = 'Message'
     self.tooltip = 'Tooltip'
     fullname = os.path.join(Constants.FONTS_DIR, 'neuropolitical.ttf')
     self.titleFont = pygame.font.Font(fullname, 19)
     self.textFont = pygame.font.Font(fullname, 16)
     self.tooltipFont = pygame.font.Font(fullname, 14)
Ejemplo n.º 3
0
Archivo: HUD.py Proyecto: hmourit/Aleph
 def __init__(self, director, position, visible, player=None):
     bgStyle = createHUDStyle(Resources.load_image("HUD_bg.png"))
     Container.__init__(self, director, position, bgStyle, visible)
     buttonImage = Resources.load_image("active_button.png")
     objectImage = pygame.Surface((2, 2))
     activeButtonStyle = ContainerButton.createContainerButtonStyle(buttonImage, objectImage, 78)
     self.leftButton = ImageButton.ImageButton(self.director, (180, 15), activeButtonStyle)
     self.rightButton = ImageButton.ImageButton(self.director, (542, 15), activeButtonStyle)
     Container.addWidget(self, self.leftButton)
     Container.addWidget(self, self.rightButton)
     self.hidden = True
     self.player = player
     self.originalPosition = self.position
     self.lastEvent = None
     self.newEvent = False
Ejemplo n.º 4
0
Archivo: HUD.py Proyecto: hmourit/Aleph
 def __init__(self, director, position, visible, player=None):
     bgStyle = createHUDStyle(Resources.load_image("HUD_bg.png"))
     Container.__init__(self, director, position, bgStyle, visible)
     buttonImage = Resources.load_image('active_button.png')
     objectImage = pygame.Surface((2, 2))
     activeButtonStyle = ContainerButton.createContainerButtonStyle(
         buttonImage, objectImage, 78)
     self.leftButton = ImageButton.ImageButton(self.director, (180, 15),
                                               activeButtonStyle)
     self.rightButton = ImageButton.ImageButton(self.director, (542, 15),
                                                activeButtonStyle)
     Container.addWidget(self, self.leftButton)
     Container.addWidget(self, self.rightButton)
     self.hidden = True
     self.player = player
     self.originalPosition = self.position
     self.lastEvent = None
     self.newEvent = False