Author: alink
Date: Wed Apr 25 02:26:15 2007
New Revision: 17063
URL: http://svn.gna.org/viewcvs/wesnoth?rev=17063&view=rev
Log:
Fix the mousewheel use in the terrain list
Modified:
trunk/src/editor/editor.cpp
Modified: trunk/src/editor/editor.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor/editor.cpp?rev=17063&r1=17062&r2=17063&view=diff
==============================================================================
--- trunk/src/editor/editor.cpp (original)
+++ trunk/src/editor/editor.cpp Wed Apr 25 02:26:15 2007
@@ -370,14 +370,16 @@
const int ydisp = mousey - centery;
gui_.scroll(xdisp, ydisp);
}
- if (event.button == SDL_BUTTON_WHEELUP) {
- scrolly = - preferences::scroll_speed();
- } else if (event.button == SDL_BUTTON_WHEELDOWN) {
- scrolly = preferences::scroll_speed();
- } else if (event.button == SDL_BUTTON_WHEELLEFT) {
- scrollx = - preferences::scroll_speed();
- } else if (event.button == SDL_BUTTON_WHEELRIGHT) {
- scrollx = preferences::scroll_speed();
+ if (point_in_rect(mousex, mousey, gui_.map_area())) {
+ if (event.button == SDL_BUTTON_WHEELUP) {
+ scrolly = - preferences::scroll_speed();
+ } else if (event.button == SDL_BUTTON_WHEELDOWN) {
+ scrolly = preferences::scroll_speed();
+ } else if (event.button == SDL_BUTTON_WHEELLEFT) {
+ scrollx = - preferences::scroll_speed();
+ } else if (event.button == SDL_BUTTON_WHEELRIGHT) {
+ scrollx = preferences::scroll_speed();
+ }
}
if (scrollx != 0 || scrolly != 0) {
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits