def __init__(self, x, y, text, parent, c=(255,0,0)): Button.__init__(self, x, y, text, parent, c) self.font = pygame.font.SysFont('Calibri', 12) self.width -= 10 self.height = 20 self.surface = pygame.Surface((self.width, self.height)) self.render()
def __init__ (self, text): Button.__init__ (self, text) # Internal click handler self.__click = False self._active = False # The ToggleButton emits a 'toggled' event. self._signals[SIG_TOGGLED] = []
def __init__(self, parent, **kwargs): Button.__init__(self, parent) # data self.direction = Const.ALIGN_N # del del self.text del self.icons # flags self.processKWArguments(kwargs) parent.registerWidget(self)
def __init__(self, parent, **kwargs): Button.__init__(self, parent) # data self.direction = ALIGN_N # del del self.text del self.icons # flags self.processKWArguments(kwargs) parent.registerWidget(self)
def __init__ (self, caption, _props={}): # Properties props = _props.copy() if 'class' in props: props['class'] += ' druid-button' else: props['class'] = 'druid-button' # Parent's constructor Button.__init__ (self, caption, props)
def __init__(self, caption, _props={}): # Properties props = _props.copy() if 'class' in props: props['class'] += ' druid-button' else: props['class'] = 'druid-button' # Parent's constructor Button.__init__(self, caption, props)
def __init__(self, pX, pY, pText, pColor=BLACK, pFontSize=36, pMethod=None, pName=None, pParams=None): ''' Constructor ''' if pName == None: name = pText else: name = pName Button.__init__(self, pX, pY, pName=name, pMethod=pMethod, pParams=pParams) font = pygame.font.Font(None, pFontSize) self.text = font.render(pText, 1, (pColor))
def __init__(self, button_pin=29, led_pin=31): # GPIO interaction Button.__init__(self, pin=button_pin) LED.__init__(self, pin=led_pin) GPIO.add_event_callback(self.button_pin, callback=self.listener) # for record self.pa = None self.stream = None self.frames = None # check button state self.button_pressed = None while True: time.sleep(.01)
def __init__(self, text=' ', x=None, y=None, width=35, height=35, bg_color=None, fg_color=None, selected_bg_color=None, selected_fg_color=None): self.upper_case = True self.max_width = width Button.__init__(self, text, None, x, y, width, height, bg_color, fg_color, selected_bg_color, selected_fg_color, border=None) self.h_margin = 0 self.v_margin = 0 self.h_spacing = 0 self.v_spacing = 0 self.set_v_align(Align.BOTTOM) self.set_h_align(Align.CENTER) self.label.set_v_align(Align.CENTER) self.label.set_h_align(Align.CENTER) for c in copy.copy(self.children): if isinstance(c, Border): self.children.remove(c) self.border = -1
def __init__(self, parent, **kwargs): Button.__init__(self, parent) # data # flags self.processKWArguments(kwargs) parent.registerWidget(self)
def __init__(self, component): Button.__init__(self, component) self.buttonStyle = Button.CHECKBOX_STYLE
def __init__(self, caption="Submit"): Button.__init__(self, caption)
def __init__(self, x, y, button_text, game): Button.__init__(self, x, y, button_text) self.game = game
def __init__(self, icon): Button.__init__(self, "", icon) self.set_images(theme.ui_toolbar_button_1, theme.ui_toolbar_button_2)
def __init__(self, text, x, y, width, height, paddle): Button.__init__(self, text, x, y, width, height) self.paddle = paddle
def __init__ (self, caption="Submit"): Button.__init__ (self, caption)
def __init__ (self, image): Button.__init__ (self, "") self._picture = None self._path = None self.set_picture (image)
def __init__(self, parent=None, name=None): Button.__init__(self, parent, name) self.setFixedSize(ITEM_SIZE)
def __init__(self, texture): Button.__init__(self, texture)