From 398f3df8af02047a76ab7172c69d93313250260c Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 29 Jan 2012 13:51:31 +0000 Subject: FS#80 Have mouse focus stick to the widget when the mouse button is down. --- src/ui/widget.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/ui/widget.h') diff --git a/src/ui/widget.h b/src/ui/widget.h index 77a84c2..ada1f5b 100644 --- a/src/ui/widget.h +++ b/src/ui/widget.h @@ -38,8 +38,9 @@ public: EventListItemClicked = 2, EventListViewChanged = 3, EventSliderChanged = 4, - EventWindowShow = 5, - EventWindowHide = 6 + EventScrollBarChanged = 5, + EventWindowShow = 6, + EventWindowHide = 7 }; /// create a new widget @@ -287,7 +288,7 @@ public: } protected: - + /// find the widget that has input focus virtual Widget *find_input_focus(); @@ -295,6 +296,9 @@ protected: /** @param cursor mouse cursor position relative to this widget's location */ Widget *find_mouse_focus(const math::Vector2f & cursor); + + /// find a visible widget + Widget *find_visible_child(const Widget *widget); /// list widget content size_t list(const size_t indent, const bool visible_only = false) const; -- cgit v1.2.3