aboutsummaryrefslogtreecommitdiff
path: root/src/ui/control.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-11-05 23:25:57 +0800
committercrupest <crupest@outlook.com>2018-11-05 23:25:57 +0800
commitfb1b16cd0ab189d61efe6237b2c2b1f7f72f90de (patch)
treee537823b914b407dc9ce5b5a69f91dc93d834426 /src/ui/control.cpp
parenta908cff41ce987f4adc597f9e5ad4105e56e6ff4 (diff)
downloadcru-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.cpp8
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())