From 0e078670b7c32646bec6431d5dc48df450babc5d Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 14 Jul 2010 17:36:27 +0000 Subject: (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. --- src/window_gui.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/window_gui.h') 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. -- cgit v1.2.3-54-g00ecf