def __init__(self, text="", ok="Ok", cancel="Cancel", window=None, batch=None, group=None, theme=None, on_ok=None, on_cancel=None): def on_ok_click(_): if on_ok is not None: on_ok(self) self.delete() def on_cancel_click(_): if on_cancel is not None: on_cancel(self) self.delete() Manager.__init__(self, content=Frame( VerticalContainer([ Label(text), HorizontalContainer([Button(ok, on_press=on_ok_click), None, Button(cancel, on_press=on_cancel_click)] )]) ), window=window, batch=batch, group=group, theme=theme, is_movable=True)
def unload_graphics(self): Button.unload_graphics(self) HighlightMixin.unload_graphics(self)
def __init__(self, text, is_pressed=False, on_press=None): Button.__init__(self, text, is_pressed, on_press) HighlightMixin.__init__(self)