aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/components/PopupButton.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-02-26 21:13:52 +0800
committercrupest <crupest@outlook.com>2022-02-26 21:13:52 +0800
commit38221428a5ea4bc71f03508dafdc6ad65ebfbea1 (patch)
tree3248edb39faf98aa19647f30477bcc6cf734ebb3 /include/cru/ui/components/PopupButton.h
parent8da596f7b5fdbcf11fbda4aa66efc87a219f58ae (diff)
downloadcru-38221428a5ea4bc71f03508dafdc6ad65ebfbea1.tar.gz
cru-38221428a5ea4bc71f03508dafdc6ad65ebfbea1.tar.bz2
cru-38221428a5ea4bc71f03508dafdc6ad65ebfbea1.zip
...
Diffstat (limited to 'include/cru/ui/components/PopupButton.h')
-rw-r--r--include/cru/ui/components/PopupButton.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/cru/ui/components/PopupButton.h b/include/cru/ui/components/PopupButton.h
index 38109fbe..37420ff6 100644
--- a/include/cru/ui/components/PopupButton.h
+++ b/include/cru/ui/components/PopupButton.h
@@ -15,9 +15,15 @@ class CRU_UI_API PopupMenuTextButton : public Component {
public:
ui::controls::Control* GetRootControl() override { return &button_; }
+ ui::controls::Button* GetButton() { return &button_; }
+
String GetButtonText() { return button_text_.GetText(); }
void SetButtonText(String text) { button_text_.SetText(std::move(text)); }
+ void SetButtonTextColor(const Color& color) {
+ button_text_.SetTextColor(color);
+ }
+
void SetMenuItems(std::vector<String> items);
IEvent<Index>* MenuItemSelectedEvent() { return &menu_item_selected_event_; }