diff options
author | terkhen <terkhen@openttd.org> | 2010-07-11 11:00:09 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2010-07-11 11:00:09 +0000 |
commit | 9cf9bb9b920c682515ddbd5ce56f1debe00ebd0d (patch) | |
tree | ad192b72495c4ceae20a744bb81b8298cd1dcc48 /src/window.cpp | |
parent | 10fbb87823dd689844c93ce8b0d43a5098acdba9 (diff) | |
download | openttd-9cf9bb9b920c682515ddbd5ce56f1debe00ebd0d.tar.xz |
(svn r20121) -Add: OnHover method for windows.
Diffstat (limited to 'src/window.cpp')
-rw-r--r-- | src/window.cpp | 6 |
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); } /** |