diff options
author | quou <quou@disroot.org> | 2025-01-24 00:37:53 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2025-01-24 00:37:53 +1100 |
commit | c0dc2dbcd26ca307bd7985c8626a2a1425a961fa (patch) | |
tree | 97c5466d22b79ade317d409ba19f1ca6e2e54a81 /ui.hpp | |
parent | 3afcec1798977d3309a5359b56b9534d87e70b6b (diff) |
UI checkbox
Diffstat (limited to 'ui.hpp')
-rw-r--r-- | ui.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -117,7 +117,8 @@ struct UI { input_changed, input_finalised, text_typed, - text_backspaced + text_backspaced, + checkbox_changed } type; void* payload; }; @@ -201,6 +202,15 @@ struct UI { void on_render() override; }; + struct Checkbox : Element { + Label* label; + Button* btn; + bool val; + Checkbox(UI* ui, Element* parent, const char* text); + Rect layout(const Rect& avail) override; + void set_val(bool v); + }; + typedef int (*Input_Filter)(char ch); struct Input : Element { |