Exemple #1
0
 def __init__(self, x, y, width, height):
     Layer.__init__(self, x, y, width, height, [255.0, 0.0, 0.0])
     Hotspot.__init__(self, x, y, width, height, columns=len(CommandBar.BUTTONS), hover_type=Hotspot.HOVER_CLICK)
     
     self.batches = graphics.Batch()
     self.commands = []
     for text in CommandBar.BUTTONS:
         self.create_label(text)
     
     self.redistribute_labels()
Exemple #2
0
 def __init__(self, x, y, width, height):
     Layer.__init__(self, x, y, width, height, [255.0, 0.0, 255.0])
     
     self.batches = graphics.Batch()
     self.items = []
     
     self.line_quantity = height / GameView.EFFECTS_LINE_HEIGHT
     for i in range(self.line_quantity):
         self.items.append(text.Label(font_name=GameView.FONT_NAME, font_size=GameView.EFFECTS_FONT_SIZE, x=x, y=y+i*GameView.EFFECTS_LINE_HEIGHT, batch=self.batches))
     
     Hotspot.__init__(self, x, y, width, height, rows=self.line_quantity)
Exemple #3
0
 def __init__(self, x, y, width, height):
     Layer.__init__(self, x, y, width, height, [0.0, 255.0, 255.0])
     
     self.batches = graphics.Batch()
     self.log = []
     self.max_chars = int(width / GameView.LOG_FONT_SIZE * GameView.FONT_RATIO)
     
     for i in range(GameView.LOG_LINE_QUANTITY):
         self.log.append(text.Label(font_name=GameView.FONT_NAME, font_size=GameView.LOG_FONT_SIZE, x=x, y=y+i*GameView.LOG_LINE_HEIGHT, batch=self.batches))
     
     self.info = text.HTMLLabel(x=x, y=height, width=width, height=height, multiline=True, batch=self.batches)
Exemple #4
0
    def __init__(self, x, y, width, height, tile_width, tile_height, color):
        Layer.__init__(self, x, y, width, height, color)
        self.cursor = sprite.Sprite(visual.Cursor.get(visual.Cursor.SELECT), x=-50)
        self.show_cursor = False
        
        self.tile_width = tile_width
        self.tile_height = tile_height
        self.grid_width = self.width / self.tile_width
        self.grid_height = self.height / self.tile_height

        self.cursor.scale = float(self.tile_width / 32.0)
        
        GameHotspot.__init__(self, x, y, width, height, self.grid_height, self.grid_width, hover_type=Hotspot.HOVER_HIDDEN)
Exemple #5
0
 def __init__(self, x, y, width, height):
     Layer.__init__(self, x, y, width, height, [0.0, 255.0, 0.0])
     
     self.batches = graphics.Batch()
     self.portrait = sprite.Sprite(visual.Character.HELENA, x+0, y+height-240, batch=self.batches)
     self.portrait.scale = 0.8
     
     self.name = self.create_label(5, 250, 4)
     self.hp = self.create_label(5, 270, 4)
     self.hp.color = (255, 215, 0, 255)
     self.mana = self.create_label(5, 285, 4)
     self.mana.color = (135, 206, 235, 255)
     self.attributes = self.create_label(5, 310, 2, multiline=True)
     
     self.effects = self.create_label(5, 415, multiline=True)
Exemple #6
0
 def __init__(self, x, y, width, height):
     Layer.__init__(self, x, y, width, height)