diff options
author | crupest <crupest@outlook.com> | 2022-01-27 21:21:51 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-01-27 21:21:51 +0800 |
commit | 560c0ead613658a2b7444907c3d1d69e49be8c32 (patch) | |
tree | 37938098f0e80403d572accf9f7a275ec8792c00 /src/ui/components | |
parent | 56633dab8c1bf9d25a6367a651b5b054055a2130 (diff) | |
download | cru-560c0ead613658a2b7444907c3d1d69e49be8c32.tar.gz cru-560c0ead613658a2b7444907c3d1d69e49be8c32.tar.bz2 cru-560c0ead613658a2b7444907c3d1d69e49be8c32.zip |
...
Diffstat (limited to 'src/ui/components')
-rw-r--r-- | src/ui/components/Menu.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/components/Menu.cpp b/src/ui/components/Menu.cpp index 05324865..7405b23c 100644 --- a/src/ui/components/Menu.cpp +++ b/src/ui/components/Menu.cpp @@ -1,6 +1,7 @@ #include "cru/ui/components/Menu.hpp" #include <functional> #include "cru/platform/gui/Window.hpp" +#include "cru/ui/ThemeManager.hpp" #include "cru/ui/UiManager.hpp" #include "cru/ui/controls/Button.hpp" #include "cru/ui/controls/Control.hpp" @@ -16,7 +17,7 @@ MenuItem::MenuItem() { text_ = controls::TextBlock::Create(); container_->SetChild(text_); container_->GetStyleRuleSet()->SetParent( - &UiManager::GetInstance()->GetThemeResources()->menu_item_style); + ThemeManager::GetInstance()->GetResourceStyleRuleSet(u"menuitem.style")); container_->ClickEvent()->AddHandler([this](const helper::ClickEventArgs&) { if (this->on_click_) this->on_click_(); }); |