Exemple #1
0
 def __init__(self, text, max_width=None, max_height=None, align=LEFT,
              size=None, bold=False, italic=False, color=None,
              focusable=True, theme=None):
     if size is None:
         size = menu_config.font_size
     
     Widget.__init__(self, focusable=focusable, theme=theme)
     self._text = text
     self._size = size
     self._bold = bold
     self._italic = italic
     self._color = color
     self.align = align
     self.changed = False
     self.image = None
     self.max_width = max_width
     self.max_height = max_height
     self.draw()
Exemple #2
0
 def render(self, screen, x_offset, y_offset):
     Widget.render(self, screen, x_offset, y_offset)
     Div.render(self, screen, x_offset, y_offset)
Exemple #3
0
 def __init__(self, animation, focusable=True):
     Widget.__init__(self, focusable=focusable, theme=None)
     self.image = animation
     self.width = animation.width
     self.height = animation.height
Exemple #4
0
 def __init__(self, surface=None, focusable=True, theme=None):
     Widget.__init__(self, focusable=focusable, theme=theme)
     self.image = None
     self.surf = surface
Exemple #5
0
 def __init__(self, width, height, filled=1.0, focusable=True, theme=None):
     Widget.__init__(self, width, height, focusable, theme)
     self.filled = filled
     self.changed = True
     self.draw()
Exemple #6
0
 def __init__(self, animation, focusable=True):
     Widget.__init__(self, focusable=focusable, theme=None)
     self.image = animation
     self.width = animation.width
     self.height = animation.height
Exemple #7
0
 def __init__(self, surface=None, focusable=True, theme=None):
     Widget.__init__(self, focusable=focusable, theme=theme)
     self.image = None
     self.surf = surface
Exemple #8
0
 def render(self, screen, x_offset, y_offset):
     Widget.render(self, screen, x_offset, y_offset)
     Div.render(self, screen, x_offset, y_offset)
Exemple #9
0
 def __init__(self, width, height, filled=1.0, focusable=True,
              theme=None):
     Widget.__init__(self, width, height, focusable, theme)
     self.filled = filled
     self.changed = True
     self.draw()
Exemple #10
0
 def __init__(self, width, height, focusable=False, theme=None):
     Widget.__init__(self, width, height, focusable, theme)
     self.widgets = []