def __init__(self, x=None, y=None, w=None, h=None, imgpath=C_IMG.PLACEHOLDER, vec2_pos=None, size=None, keycode=u"\uf071", padding=0): super(Button, self).__init__(x=x, y=y, w=w, h=h, size=size, vec2_pos=vec2_pos) self.imgpath = imgpath self.sprite = None self.keycode = keycode self.icon_padding = padding self.texticon = None self.texticon_color = Color.BLACK self.buttonsquircle = Rect(self.x, self.y, self.w, self.h, width=1, transparent=False)
def __init__(self, x=None, y=None, w=None, h=None, vec2_pos=None, size=None, color=COLOR.BLACK, index=None): super(CheckboxRect, self).__init__(x, y, w, h, vec2_pos, size) self.main_rect = Rect(self.x, self.y, self.w, self.h, color=color, width=1, transparent=False) self.selected = False self.index = index self.imgpath = LoadZip_Image(index) self.sprite = None
def __init__(self, x=None, y=None, w=None, h=None, vec2_pos=None, size=None, parent=None): super(DataManagementScreen, self).__init__(x, y, w, h, vec2_pos, size) self.radiobuttons = [] self.button_ok = Button(self.x + 325, self.y + 450, 75, 75, keycode=FONT_AWESOME.CHECK) self.button_ok.SetTextIconColor(COLOR.GREEN) self.button_cancel = Button(self.x + 500, self.y + 450, 75, 75, keycode=FONT_AWESOME.CLOSE, padding=8) self.button_cancel.SetTextIconColor(COLOR.RED) self.main_rect = Rect(self.x, self.y, self.w, self.h, color=COLOR.BLACK, width=1, transparent=False) self.PrepareCheckboxes() self.text = None self.font = None self.text_load = None self.text_save = None self.selected = None self.parent = parent self.timer = 0
def get_self_bounds(self): size = self.engine.get_text_size(self.values[0]) return Rect(size=size)
def get_self_bounds(self): size = Vector2(2 * self.packer.padding, self.packer.padding) return Rect(size=size)