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()
def render(self, screen, x_offset, y_offset): Widget.render(self, screen, x_offset, y_offset) Div.render(self, screen, x_offset, y_offset)
def __init__(self, animation, focusable=True): Widget.__init__(self, focusable=focusable, theme=None) self.image = animation self.width = animation.width self.height = animation.height
def __init__(self, surface=None, focusable=True, theme=None): Widget.__init__(self, focusable=focusable, theme=theme) self.image = None self.surf = surface
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()
def __init__(self, width, height, focusable=False, theme=None): Widget.__init__(self, width, height, focusable, theme) self.widgets = []