Example #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)
Example #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)
Example #3
0
File: HUD.py Project: 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
Example #4
0
File: HUD.py Project: 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