diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-09-25 17:29:17 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-09-25 17:29:17 +0200 |
commit | 497217a3e09b577f650aaf503356588515067ca8 (patch) | |
tree | 2fd43b747957510c55d66caf81df30732c39c398 /include/gui/Button.hpp | |
parent | 663a36df4aaea583e7cd56ad35b26d05f6151746 (diff) |
widgets
Diffstat (limited to 'include/gui/Button.hpp')
-rw-r--r-- | include/gui/Button.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/gui/Button.hpp b/include/gui/Button.hpp index 84098b2..972e5c9 100644 --- a/include/gui/Button.hpp +++ b/include/gui/Button.hpp @@ -8,9 +8,14 @@ namespace gsr { class Button : public Widget { public: Button(mgl::vec2f size); - void on_event(mgl::Event &event, mgl::Window &window) override; + Button(const Button&) = delete; + Button& operator=(const Button&) = delete; + + bool on_event(mgl::Event &event, mgl::Window &window) override; void draw(mgl::Window &window) override; + mgl::vec2f get_size() const { return size; } + std::function<void()> on_click; private: mgl::vec2f size; |