summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-07-11 11:00:09 +0000
committerterkhen <terkhen@openttd.org>2010-07-11 11:00:09 +0000
commit9cf9bb9b920c682515ddbd5ce56f1debe00ebd0d (patch)
treead192b72495c4ceae20a744bb81b8298cd1dcc48 /src/window.cpp
parent10fbb87823dd689844c93ce8b0d43a5098acdba9 (diff)
downloadopenttd-9cf9bb9b920c682515ddbd5ce56f1debe00ebd0d.tar.xz
(svn r20121) -Add: OnHover method for windows.
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/window.cpp b/src/window.cpp
index d34f138b6..0fae692df 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -409,6 +409,12 @@ static void DispatchHoverEvent(Window *w, int x, int y)
GuiShowTooltips(wid->tool_tip);
return;
}
+
+ /* Widget has no index, so the window is not interested in it. */
+ if (wid->index < 0) return;
+
+ Point pt = { x, y };
+ w->OnHover(pt, wid->index);
}
/**