From 6c2fc3716c9c6c68e982b243af5f7ed04fb35e86 Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Tue, 19 Nov 2024 15:16:16 +0100 Subject: button handling --- src/crepe/api/Button.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/crepe/api/Button.h (limited to 'src/crepe/api/Button.h') diff --git a/src/crepe/api/Button.h b/src/crepe/api/Button.h new file mode 100644 index 0000000..5035729 --- /dev/null +++ b/src/crepe/api/Button.h @@ -0,0 +1,17 @@ +#include + +#include "Component.h" +#include "api/EventHandler.h" +#include "api/UiObject.h" +namespace crepe { +class Button : public UiObject{ +public: + ~Button(){}; + bool interactable = true; + bool is_toggle = false; + bool is_pressed = false; + std::function on_click; +public: +virtual int get_instances_max() const { return 1; } +}; +} -- cgit v1.2.3