summaryrefslogtreecommitdiff
path: root/src/window_gui.h
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2019-02-14 06:25:17 +0000
committerCharles Pigott <charlespigott@googlemail.com>2019-02-21 08:11:35 +0000
commitde9f54ccc185d35727858a36fcebc82178c519c6 (patch)
tree661eacdde5ffdbc9e16f5a80eb67024c384634f8 /src/window_gui.h
parent66d23e3e865167200a1121d30be9f538bb878507 (diff)
downloadopenttd-de9f54ccc185d35727858a36fcebc82178c519c6.tar.xz
Codechange: Change scrolling_scrollbar to mouse_capture_widget, and dispatch OnClick() event if widget is not a scrollbar.
This allows any widget to support mouse capture.
Diffstat (limited to 'src/window_gui.h')
-rw-r--r--src/window_gui.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/window_gui.h b/src/window_gui.h
index f5f9734c3..0abf79cca 100644
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -327,7 +327,7 @@ public:
NWidgetStacked *shade_select; ///< Selection widget (#NWID_SELECTION) to use for shading the window. If \c NULL, window cannot shade.
Dimension unshaded_size; ///< Last known unshaded size (only valid while shaded).
- int scrolling_scrollbar; ///< Widgetindex of just being dragged scrollbar. -1 if none is active.
+ int mouse_capture_widget; ///< Widgetindex of current mouse capture widget (e.g. dragged scrollbar). -1 if no widget has mouse capture.
Window *parent; ///< Parent window.
Window *z_front; ///< The window in front of us in z-order.