def __init__(self, label="", is_pressed=False, on_press=None,width=0,height=0,font_size=None,path=None,alternative=None,argument=None,outline=None,disabled=False,align=HALIGN_CENTER,font_color=None,texture=None,outlinePressingEnabled=True,font=None,font_valign=VALIGN_CENTER,on_right_press=None): TwoStateController.__init__(self, is_pressed=is_pressed, on_press=on_press) Viewer.__init__(self,width=width,height=height) self._width=width self._height=height self.label = label self._outlineGraphic=None # graphics self._label = None self._button = None self._fn=font if path is not None: self._path = [path] else: self._path = ['button'] self._alt=alternative self.font_size=font_size self.arg=argument self._outline=outline self.disabled=disabled self._al=align self._fl=font_color self._textureZ=texture self._olPressing=outlinePressingEnabled self._fontvalign=font_valign self.on_right_press=on_right_press
def __init__(self, value=0.0, min_value=0.0, max_value=1.0, on_set=None, steps=None, width=0, height=0): ContinuousStateController.__init__(self, value=value, min_value=min_value, max_value=max_value, on_set=on_set) Viewer.__init__(self, width, height) self._bar = None # a bar where the knob slides. self._knob = None # the knob that moves along the bar. self._offset = (0, 0 ) # offset of the knob image to its central position self._padding = (0, 0, 0, 0 ) # padding of the bar image to its central position self.steps = steps self._markers = [] # markers in case of discrete steps. self._step_offset = (0, 0)
def __init__(self, document, width=0, height=0, is_fixed_size=False, background=False, font_size=13, font_name='Segoe UI', font_color=None, chat=False): Viewer.__init__(self, width, height) Controller.__init__(self) self.max_height = height if isinstance(document, str): self._document = pyglet.text.document.UnformattedDocument(document) else: self._document = document self.h1 = height self.w1 = width self.chat = chat self.fontSize = font_size self.fontName = font_name self.fontColor = font_color self._bgcolor = background self._bg = None self._content = None self.content_width = width self._scrollbar = None self.set_document_style = False self.firstTimeLoad = True self.is_fixed_size = is_fixed_size
def __init__(self, text="", length=20, max_length=None, padding=0, on_input=None): Viewer.__init__(self) FocusMixin.__init__(self) self._document = pyglet.text.document.UnformattedDocument(text) self._document_style_set = False # check if style of document was set. self._length = length # the length of the box in characters self._max_length = max_length # the max length allowed for writing. self._on_input = on_input self._padding = 4 + padding # graphics loaded in both states self._field = None # graphics loaded in state "writing" self._text_layout = None self._caret = None # graphics loaded in state "label" self._label = None
def __init__(self, label="", is_pressed=False, on_press=None): TwoStateController.__init__(self, is_pressed=is_pressed, on_press=on_press) Viewer.__init__(self) self.label = label # graphics self._label = None self._button = None
def __init__(self, path: str = None, binding: Binding = None): Viewer.__init__(self) Label.__init__(self) self.path = 'label' if path is None else path # ... if binding is not None: binding.setter = lambda value: self.set_text(value) # ... pass
def __init__(self, label="", is_pressed=False, on_press=None): TwoStateController.__init__(self, is_pressed=is_pressed, on_press=on_press) Viewer.__init__(self) if isinstance(label, str): self._document = pyglet.text.document.UnformattedDocument(label) else: self._document = label # graphics self._label = None self._button = None
def __init__(self, text="", bold=False, italic=False, font_name=None, font_size=None, color=None, path=None): Viewer.__init__(self) self.text = text self.bold = bold self.italic = italic self.font_name = font_name self.font_size = font_size self.color = color self.path = path self.label = None
def __init__(self, text="", bold=False, italic=False, font_name=None, font_size=None, color=None, path=None,width=None,multiline=False): Viewer.__init__(self) self.text = text self.bold = bold self.italic = italic self.font_name = font_name self.font_size = font_size self.color = color self.path = path self.label = None self.multiline=multiline self.w=width
def __init__(self, document, width=0, height=0, is_fixed_size=False): Viewer.__init__(self, width, height) Controller.__init__(self) self.max_height = height if isinstance(document, str): self._document = pyglet.text.document.UnformattedDocument(document) else: self._document = document self._content = None self.content_width = width self._scrollbar = None self.set_document_style = False self.is_fixed_size = is_fixed_size
def __init__(self, path=None, is_expandable=False,alternative=None,outline=None,width=None,height=None,bgWidth=None,texture=None): Viewer.__init__(self) self._path = path self._expandable = is_expandable self._graphic = None self._outlineGraphic = None self.textureTmp = texture self._TextureGraphic = None self._alt=alternative self._outline=outline self._min_width = self._min_height = 0 self.w1=width self.h1=height self.bgWidth=bgWidth
def __init__(self, value=0.0, min_value=0.0, max_value=1.0, on_set=None, steps=None, width=0, height=0): ContinuousStateController.__init__(self, value=value, min_value=min_value, max_value=max_value, on_set=on_set) Viewer.__init__(self, width, height) self._bar = None # a bar where the knob slides. self._knob = None # the knob that moves along the bar. self._offset = (0, 0) # offset of the knob image to its central position self._padding = (0, 0, 0, 0) # padding of the bar image to its central position self.steps = steps self._markers = [] # markers in case of discrete steps. self._step_offset = (0, 0)
def __init__(self, label="", on_press=None,width=0,height=0,font_size=None,argument=None,outline=None,font_color=None,texture=None,font=None,font_valign=VALIGN_CENTER,leader=None): TwoStateController.__init__(self, is_pressed=False, on_press=on_press) Viewer.__init__(self,width=width,height=height) self._width=width self._height=height self.label = label self._outlineGraphic=None self._label = None self._button = None self._fn=font self._path = ['button'] self._leader=leader self.leaderGraphic=None self.font_size=font_size self.arg=argument self._outline=outline self._fl=font_color self._textureZ=texture self._fontvalign=font_valign
def __init__(self, on_press=None,width=0,height=0,hover=None,argument=None,outline=None,disabled=False,arguments=None,texture=None,hoveringType=None,path=None): TwoStateController.__init__(self, is_pressed=False, on_press=on_press) Viewer.__init__(self,width=width,height=height) self.disabled=disabled self._width=width self._height=height self._outlineGraphic=None self._button = None self.hover=hover self._path=path self.leaderGraphic=None self.arg=argument self.args=arguments self._outline=outline self._painting=None self._textureZ=texture self.pressing=False self.hovering=False self.hoveringType = hoveringType self.paintingLoaded=False
def __init__(self, text="", length=20, max_length=None, font=None, padding=0, on_input=None, width=None, height=None, font_size=None, font_color=None, multiline=False): Viewer.__init__(self) FocusMixin.__init__(self) self._document = pyglet.text.document.UnformattedDocument(text) self._document_style_set = False # check if style of document was set. self._length = length # the length of the box in characters self._max_length = max_length # the max length allowed for writing. self._on_input = on_input self.focused = False self._padding = 4 + padding # graphics loaded in both states self._field = None self.w1 = width self.h1 = height self._fs = font_size # graphics loaded in state "writing" self._text_layout = None self._caret = None self._font = font self._font_color = font_color # graphics loaded in state "label" self._label = None self.ml = multiline self._caret_height = 0
def __init__(self, path, is_expandable=False): Viewer.__init__(self) self._path = path self._expandable = is_expandable self._graphic = None self._min_width = self._min_height = 0
def __init__(self, min_width=0, min_height=0): Viewer.__init__(self) self._min_width, self._min_height = min_width, min_height
def __init__(self): Viewer.__init__(self) Controller.__init__(self) self._highlight = None self._highlight_flag = False
def __init__(self): Controller.__init__(self) Viewer.__init__(self) self._focus = None self._focus_flag = False