def __init__(self, parent, name, x, y): Group.__init__(self, parent, name, x, y, 33, 33) k = self.knob = Box(self, "led", 33, 33, s=LEDSettings) self.highlight = RoundRect(self, "highlight", 3, 3, 12, 12, 3, 6, color="#eeeeee") self.inner_glow = RoundRect(self, "glow", 5, 5, 20, 18, 3, 9, color="#a0ff50") self.outer_glow = RoundRect(self, "glow", 0, 0, 33, 33, 0, 16, color="#a0ff50") self.STATE = 1
def __init__(self, p, name, x=0, y=0, w=10, h=10, ox=0, oy=0): Group.__init__(self, p, name, x, y, w, h, ox, oy) self.mouseOwner = None
def __init__(self, parent, name, w, h, s=DefaultSettings): Group.__init__(self, parent, name, w=w, h=h) self.settings = s if s.shadow_offset > 0: self.shadow = RoundRect( self, "shadow", s.shadow_offset, s.shadow_offset, w, h, s.inner_radius - s.shadow_blur, s.outer_radius, color="#000000", ) else: self.shadow = None if s.border_thickness > 0: self.border = RoundRect(self, "border", 0, 0, w, h, s.inner_radius, s.outer_radius, color=s.border_color) else: self.border = None self.highlight = RoundRect( self, "highlight", s.border_thickness, s.border_thickness, w, h, s.inner_radius - s.border_thickness, s.outer_radius - s.border_thickness, color=self.mixColor(s.color, "#ffffff", s.highlight_amount), ) self.lowlight = RoundRect( self, "lowlight", s.border_thickness + 1 * s.bevel_size, s.border_thickness + 1 * s.bevel_size, w, h, s.inner_radius - s.border_thickness, s.outer_radius - s.border_thickness, color=self.mixColor(s.color, "#000000", s.lowlight_amount), ) self.main = RoundRect( self, "border", # s.border_thickness + s.bevel_size, s.border_thickness + s.bevel_size, s.border_thickness, s.border_thickness, w, h, s.inner_radius - s.border_thickness, s.outer_radius - s.border_thickness + s.bevel_size, color=s.color, ) self.doLayout(w, h)