aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Button.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api/Button.h')
-rw-r--r--src/crepe/api/Button.h17
1 files changed, 17 insertions, 0 deletions
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 <functional>
+
+#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<void()> on_click;
+public:
+virtual int get_instances_max() const { return 1; }
+};
+}