summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-08-21 14:59:58 +0000
committertruelight <truelight@openttd.org>2006-08-21 14:59:58 +0000
commita8245983674b253c3eecf44f37acf35a3261763c (patch)
tree1a79335a7851122f14fcde23385216d03efb72aa /main_gui.c
parent5ca40263a8cdf469f3a17c74e5147ca0726525ee (diff)
downloadopenttd-a8245983674b253c3eecf44f37acf35a3261763c.tar.xz
(svn r6038) -Codechange: move mousewheel code to event WE_MOUSEWHEEL instead of a general function that handles that
-Codechange: use always 'e' for WindowsEvent, neverr 'we'
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main_gui.c b/main_gui.c
index 2e0653de9..23c9523ce 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -2329,6 +2329,10 @@ static void MainWindowWndProc(Window *w, WindowEvent *e)
WP(w, vp_d).scrollpos_x += e->scroll.delta.x << vp->zoom;
WP(w, vp_d).scrollpos_y += e->scroll.delta.y << vp->zoom;
} break;
+
+ case WE_MOUSEWHEEL:
+ ZoomInOrOutToCursorWindow(e->wheel.wheel < 0, w);
+ break;
}
}