Ejemplo n.º 1
0
 def __init__(self, stage):
     SelectableObjectBase.__init__(self)
     self.stage = stage
     self.image_height = 225
     self.image_width = 300
     self.outline_width = 4
     self.label_padding = 5
     self.label = button.Label(
         (self.position[0],
         self.position[1] + self.image_height + self.outline_width + self.label_padding),
         self.stage.name, 
         (255,255,255), 
         button.FONT_SIZES[6]
     )
     self.height = self.image_height + self.outline_width + self.label_padding + self.label.height
     self.width = self.image_width + self.outline_width
     self.scale = self.get_scale()
     self.image = pygame.transform.scale(
         self.stage.background_image,
         (min(int(self.scale * stage.width), self.image_width),
         min(int(self.scale * stage.height), self.image_height))
     )
     self.fixed_dimensions = True
     
     self.add_child(self.label)
 def __init__(self, color, border_outer_line_color, position, width, height):
     SelectableObjectBase.__init__(self)
     self.color = color
     self.active_color = color
     self.selected_color = color
     self.border_outer_line_color = border_outer_line_color
     self.position = position
     self.height = height
     self.width = width
 def __init__(self, color, center, radius):
     SelectableObjectBase.__init__(self)
     self.color = color
     self.active_color = color
     self.selected_color = color
     self.center = center
     self.position = (center[0] - radius, center[1] - radius)
     self.height = radius
     self.width = radius
     self.radius = radius