summaryrefslogtreecommitdiff
path: root/src/window.cpp
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-03-11 21:53:46 +0000
committerbjarni <bjarni@openttd.org>2007-03-11 21:53:46 +0000
commit4cc3551ef2f9598a2267bd53cf65f672d4d77da3 (patch)
tree3b2dc7daa60eae1b6aa8a2e76b14a3f46e6f3348 /src/window.cpp
parent3cf65b8a08c51aca91e2d19de8dc625874a58cf1 (diff)
downloadopenttd-4cc3551ef2f9598a2267bd53cf65f672d4d77da3.tar.xz
(svn r9126) -Feature: "Function of scrollwheel" can now be set to off as well
Note: since this can be useful for all platforms, the GUI is no longer OSX specific. Note: scrolling lists is still unaffected by this setting
Diffstat (limited to 'src/window.cpp')
-rw-r--r--src/window.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 15062ad4b..d38abb4e2 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -1665,12 +1665,15 @@ void MouseLoop(int click, int mousewheel)
if (vp != NULL && (_game_mode == GM_MENU || IsGeneratingWorld())) return;
if (mousewheel != 0) {
- WindowEvent e;
+ if (_patches.scrollwheel_scrolling == 0) {
+ /* Scrollwheel is in zoom mode. Make the zoom event. */
+ WindowEvent e;
- /* Send WE_MOUSEWHEEL event to window */
- e.event = WE_MOUSEWHEEL;
- e.we.wheel.wheel = mousewheel;
- if (!scrollwheel_scrolling) w->wndproc(w, &e);
+ /* Send WE_MOUSEWHEEL event to window */
+ e.event = WE_MOUSEWHEEL;
+ e.we.wheel.wheel = mousewheel;
+ w->wndproc(w, &e);
+ }
/* Dispatch a MouseWheelEvent for widgets if it is not a viewport */
if (vp == NULL) DispatchMouseWheelEvent(w, GetWidgetFromPos(w, x - w->left, y - w->top), mousewheel);