diff options
author | crupest <crupest@outlook.com> | 2020-12-25 14:43:19 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-12-25 14:43:19 +0800 |
commit | a14704fbd9b9fb377b7009a9fbe641a9b8d0fdfb (patch) | |
tree | 7ee33e1d51f15841ee908ec16b937985f7d9be96 /src/ui/UiManager.cpp | |
parent | d23cdd9c6f2fbec1329c704bde7e183b5ef07e2e (diff) | |
download | cru-a14704fbd9b9fb377b7009a9fbe641a9b8d0fdfb.tar.gz cru-a14704fbd9b9fb377b7009a9fbe641a9b8d0fdfb.tar.bz2 cru-a14704fbd9b9fb377b7009a9fbe641a9b8d0fdfb.zip |
...
Diffstat (limited to 'src/ui/UiManager.cpp')
-rw-r--r-- | src/ui/UiManager.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/ui/UiManager.cpp b/src/ui/UiManager.cpp index 5b4d4931..7981aa86 100644 --- a/src/ui/UiManager.cpp +++ b/src/ui/UiManager.cpp @@ -6,6 +6,7 @@ #include "cru/platform/graphics/Brush.hpp" #include "cru/platform/graphics/Factory.hpp" #include "cru/platform/graphics/Font.hpp" +#include "cru/platform/gui/Cursor.hpp" #include "cru/platform/gui/UiApplication.hpp" #include "cru/ui/Base.hpp" #include "cru/ui/style/ApplyBorderStyleInfo.hpp" @@ -59,23 +60,31 @@ UiManager::UiManager() { u"DefaultButton"}); theme_resource_.button_style.AddStyleRule( {ClickStateCondition::Create(ClickState::None), - BorderStyler::Create(ApplyBorderStyleInfo{ - CreateSolidColorBrush(factory, Color::FromHex(0x00bfff))}), + CompoundStyler::Create( + BorderStyler::Create(ApplyBorderStyleInfo{ + CreateSolidColorBrush(factory, Color::FromHex(0x00bfff))}), + CursorStyler::Create(platform::gui::SystemCursorType::Arrow)), u"DefaultButtonNormal"}); theme_resource_.button_style.AddStyleRule( {ClickStateCondition::Create(ClickState::Hover), - BorderStyler::Create(ApplyBorderStyleInfo{ - CreateSolidColorBrush(factory, Color::FromHex(0x47d1ff))}), + CompoundStyler::Create( + BorderStyler::Create(ApplyBorderStyleInfo{ + CreateSolidColorBrush(factory, Color::FromHex(0x47d1ff))}), + CursorStyler::Create(platform::gui::SystemCursorType::Hand)), u"DefaultButtonHover"}); theme_resource_.button_style.AddStyleRule( {ClickStateCondition::Create(ClickState::Press), - BorderStyler::Create(ApplyBorderStyleInfo{ - CreateSolidColorBrush(factory, Color::FromHex(0x91e4ff))}), + CompoundStyler::Create( + BorderStyler::Create(ApplyBorderStyleInfo{ + CreateSolidColorBrush(factory, Color::FromHex(0x91e4ff))}), + CursorStyler::Create(platform::gui::SystemCursorType::Hand)), u"DefaultButtonPress"}); theme_resource_.button_style.AddStyleRule( {ClickStateCondition::Create(ClickState::PressInactive), - BorderStyler::Create(ApplyBorderStyleInfo{ - CreateSolidColorBrush(factory, Color::FromHex(0x91e4ff))}), + CompoundStyler::Create( + BorderStyler::Create(ApplyBorderStyleInfo{ + CreateSolidColorBrush(factory, Color::FromHex(0x91e4ff))}), + CursorStyler::Create(platform::gui::SystemCursorType::Arrow)), u"DefaultButtonPressInactive"}); theme_resource_.text_box_style.AddStyleRule( |