diff options
author | bjarni <bjarni@openttd.org> | 2007-03-11 11:57:11 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2007-03-11 11:57:11 +0000 |
commit | 9be41fede6f528b86195c09a73fbcb4bd215fbab (patch) | |
tree | 4df7ee06e0a981f3da5dced054149749f7001ed4 /src | |
parent | 50fe0fe059c0dd3af5acdfdfee144e10dc678157 (diff) | |
download | openttd-9be41fede6f528b86195c09a73fbcb4bd215fbab.tar.xz |
(svn r9112) -Feature r9111: scrollwheel scrolling can now also scroll the smallmap
Diffstat (limited to 'src')
-rw-r--r-- | src/window.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/window.cpp b/src/window.cpp index 41653e926..15062ad4b 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1707,6 +1707,11 @@ void MouseLoop(int click, int mousewheel) } else { switch (click) { case 1: DispatchLeftClickEvent(w, x - w->left, y - w->top); break; + default: + if (!scrollwheel_scrolling || w == NULL || w->window_class != WC_SMALLMAP) break; + /* We try to use the scrollwheel to scroll since we didn't touch any of the buttons. + * Simulate a right button click so we can get started. */ + /* fallthough */ case 2: DispatchRightClickEvent(w, x - w->left, y - w->top); break; } } |