def __init__(self, position, width=100, font=Font(color=Color.from_name("BLACK")), accepted=None, image=None): """ Create Entry Wiget Parameters ---------- position: Vec2 Position of Entry width: int Width of Entry font: Font Font of Label of Entry accepted: sstr String of accepted characters image: str or None Background image of Entry (or None) """ super().__init__(position) self.width = width self.image = image self.label = Label(Vec2.zero(), "", font) self.text = "" self.focus = False self.accepted = accepted self.render = None self.update_render()
def __init__(self, position, size=Vec2(100, 100), font=Font(color=Color.from_name("BLACK")), accepted=None, image=None): """ Create TextEdit Wiget Parameters ---------- position: Vec2 Position of TextEdit size: Vec2 Size of TextEdit font: Font Font of Label of TextEdit accepted: str String of accepted characters image: str or None Path of Background image of TextEdit or None """ super().__init__(position) self.size = size self.image = image self.label = Label(Vec2.zero(), "", font) self.text = "" self.focus = False self.accepted = accepted self.render = None self.update_render()
def __init__(self, position, size=Vec2.zero(), color=Color.from_name("BLACK"), width=0): """ Create Ellipse Widget Parameters ---------- position: Vec2 Position of Ellipse size: Vec2 Size of Ellipse color: Color Color of Ellipse width: int Width of Ellipse (0 fill Ellipse) """ super().__init__(position) self.size = size self.color = color self.width = width