diff options
Diffstat (limited to 'include/cru/ui/controls/Button.h')
| -rw-r--r-- | include/cru/ui/controls/Button.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/include/cru/ui/controls/Button.h b/include/cru/ui/controls/Button.h index 64b9bba0..80d21d08 100644 --- a/include/cru/ui/controls/Button.h +++ b/include/cru/ui/controls/Button.h @@ -1,25 +1,21 @@ #pragma once -#include "SingleChildControl.h" - #include "../helper/ClickDetector.h" #include "../render/BorderRenderObject.h" #include "IBorderControl.h" #include "IClickableControl.h" -#include "cru/base/Event.h" +#include "SingleChildControl.h" namespace cru::ui::controls { class CRU_UI_API Button : public SingleChildControl<render::BorderRenderObject>, public virtual IClickableControl, public virtual IBorderControl { public: - static constexpr std::string_view kControlType = "Button"; + static constexpr auto kControlName = "Button"; public: Button(); ~Button() override; - std::string GetControlType() const final { return std::string(kControlType); } - public: helper::ClickState GetClickState() override { return click_detector_.GetState(); @@ -29,7 +25,7 @@ class CRU_UI_API Button : public SingleChildControl<render::BorderRenderObject>, return click_detector_.StateChangeEvent(); } - IEvent<const helper::ClickEventArgs&>* ClickEvent() { + IEvent<const helper::ClickEventArgs&>* ClickEvent() override { return click_detector_.ClickEvent(); } |
