diff options
author | Darkvater <darkvater@openttd.org> | 2006-11-07 13:06:02 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-11-07 13:06:02 +0000 |
commit | 65e051fe93d12d0cc53258e047b6bf86f47c9ce7 (patch) | |
tree | 99bc81d869567e52619264b8aa261b56be9836eb /smallmap_gui.c | |
parent | e90bc1681f4b9cdd2a726332113d161f69217ff4 (diff) | |
download | openttd-65e051fe93d12d0cc53258e047b6bf86f47c9ce7.tar.xz |
(svn r7094) -Codechange: Get rid of the window-specific code in DoZoomInOutWindow (enable, disable
buttons depending on calling window, game-mode); handle it by broadcasting messages
to the calling window, because that knows how and what buttons to set.
Diffstat (limited to 'smallmap_gui.c')
-rw-r--r-- | smallmap_gui.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/smallmap_gui.c b/smallmap_gui.c index d5a2b5342..fcb80a67b 100644 --- a/smallmap_gui.c +++ b/smallmap_gui.c @@ -1070,6 +1070,13 @@ static void ExtraViewPortWndProc(Window *w, WindowEvent *e) case WE_MOUSEWHEEL: ZoomInOrOutToCursorWindow(e->we.wheel.wheel < 0, w); break; + + + case WE_MESSAGE: + /* Only handle zoom message if intended for us (msg ZOOM_IN/ZOOM_OUT) */ + if (e->we.message.wparam != w->window_number) break; + HandleZoomMessage(w, w->viewport, 5, 6); + break; } } |