summaryrefslogtreecommitdiff
path: root/src/window_gui.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-07-14 17:36:27 +0000
committerrubidium <rubidium@openttd.org>2010-07-14 17:36:27 +0000
commit0e078670b7c32646bec6431d5dc48df450babc5d (patch)
tree47984b82f702d6220cad8185b7ceeda3d8661c8f /src/window_gui.h
parentfa3d9d04d386daf3ee92c9ab0f2624fbdcd1abf4 (diff)
downloadopenttd-0e078670b7c32646bec6431d5dc48df450babc5d.tar.xz
(svn r20145) -Codechange: keep original RMB->tooltip behaviour when hovering is disabled and there is no handled right click event for the widget, i.e. if a widget would handle the right click you won't see the tooltip anymore by right clicking; by enabling hovering you would get access to that tooltip again.
Diffstat (limited to 'src/window_gui.h')
-rw-r--r--src/window_gui.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/window_gui.h b/src/window_gui.h
index 38129cbfc..83c7e3bb9 100644
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -654,8 +654,10 @@ public:
* A click with the right mouse button has been made on the window.
* @param pt the point inside the window that has been clicked.
* @param widget the clicked widget.
+ * @return true if the click was actually handled, i.e. do not show a
+ * tooltip if tooltip-on-right-click is enabled.
*/
- virtual void OnRightClick(Point pt, int widget) {}
+ virtual bool OnRightClick(Point pt, int widget) { return false; }
/**
* The mouse is hovering over a widget in the window, perform an action for it, like opening a custom tooltip.