mail[Wesnoth-commits] r13243 - /trunk/src/play_controller.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by DannyDaemonic on August 29, 2006 - 00:16:
Author: dirus
Date: Tue Aug 29 00:16:05 2006
New Revision: 13243

URL: http://svn.gna.org/viewcvs/wesnoth?rev=13243&view=rev
Log:
Fixed bug where we scrolled in textbox and on map at the same time. (Bug 
#6334)

Modified:
    trunk/src/play_controller.cpp

Modified: trunk/src/play_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/play_controller.cpp?rev=13243&r1=13242&r2=13243&view=diff
==============================================================================
--- trunk/src/play_controller.cpp (original)
+++ trunk/src/play_controller.cpp Tue Aug 29 00:16:05 2006
@@ -603,22 +603,22 @@
        const int scroll_threshold = (preferences::mouse_scroll_enabled()) ? 
5 : 0;
        bool scrolling = false;
 
-       if(key[SDLK_UP] || mousey < scroll_threshold) {
+       if((key[SDLK_UP] && !menu_handler_.get_textbox().active()) || mousey 
< scroll_threshold) {
                gui_->scroll(0,-preferences::scroll_speed());
                scrolling = true;
        }
 
-       if(key[SDLK_DOWN] || mousey > gui_->y()-scroll_threshold) {
+       if((key[SDLK_DOWN] && !menu_handler_.get_textbox().active()) || 
mousey > gui_->y()-scroll_threshold) {
                gui_->scroll(0,preferences::scroll_speed());
                scrolling = true;
        }
 
-       if(key[SDLK_LEFT] || mousex < scroll_threshold) {
+       if((key[SDLK_LEFT] && !menu_handler_.get_textbox().active()) || 
mousex < scroll_threshold) {
                gui_->scroll(-preferences::scroll_speed(),0);
                scrolling = true;
        }
 
-       if(key[SDLK_RIGHT] || mousex > gui_->x()-scroll_threshold) {
+       if((key[SDLK_RIGHT] && !menu_handler_.get_textbox().active()) || 
mousex > gui_->x()-scroll_threshold) {
                gui_->scroll(preferences::scroll_speed(),0);
                scrolling = true;
        }




Related Messages


Powered by MHonArc, Updated Tue Aug 29 16:01:08 2006