diff options
author | crupest <crupest@outlook.com> | 2018-11-05 23:25:57 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-11-05 23:25:57 +0800 |
commit | fb1b16cd0ab189d61efe6237b2c2b1f7f72f90de (patch) | |
tree | e537823b914b407dc9ce5b5a69f91dc93d834426 /src/ui/control.cpp | |
parent | a908cff41ce987f4adc597f9e5ad4105e56e6ff4 (diff) | |
download | cru-fb1b16cd0ab189d61efe6237b2c2b1f7f72f90de.tar.gz cru-fb1b16cd0ab189d61efe6237b2c2b1f7f72f90de.tar.bz2 cru-fb1b16cd0ab189d61efe6237b2c2b1f7f72f90de.zip |
Develop cursor.
Diffstat (limited to 'src/ui/control.cpp')
-rw-r--r-- | src/ui/control.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ui/control.cpp b/src/ui/control.cpp index d080ebb0..5215c107 100644 --- a/src/ui/control.cpp +++ b/src/ui/control.cpp @@ -322,6 +322,14 @@ namespace cru { } } + void Control::SetCursor(const Cursor::Ptr& cursor) + { + cursor_ = cursor; + const auto window = GetWindow(); + if (window && window->GetMouseHoverControl() == this) + window->UpdateCursor(); + } + void Control::OnAddChild(Control* child) { if (auto window = GetWindow()) |