wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src/widgets scrollbar.cpp textbox.cpp


From: Guillaume Melquiond
Subject: [Wesnoth-cvs-commits] wesnoth/src/widgets scrollbar.cpp textbox.cpp
Date: Fri, 22 Apr 2005 18:47:26 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Guillaume Melquiond <address@hidden>    05/04/22 22:47:26

Modified files:
        src/widgets    : scrollbar.cpp textbox.cpp 

Log message:
        Fix two bugs with mouse wheel scrolling.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/scrollbar.cpp.diff?tr1=1.31&tr2=1.32&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/textbox.cpp.diff?tr1=1.76&tr2=1.77&r1=text&r2=text

Patches:
Index: wesnoth/src/widgets/scrollbar.cpp
diff -u wesnoth/src/widgets/scrollbar.cpp:1.31 
wesnoth/src/widgets/scrollbar.cpp:1.32
--- wesnoth/src/widgets/scrollbar.cpp:1.31      Fri Mar 18 21:21:48 2005
+++ wesnoth/src/widgets/scrollbar.cpp   Fri Apr 22 22:47:25 2005
@@ -1,4 +1,4 @@
-/* $Id: scrollbar.cpp,v 1.31 2005/03/18 21:21:48 ydirson Exp $*/
+/* $Id: scrollbar.cpp,v 1.32 2005/04/22 22:47:25 silene Exp $*/
 /*
    Copyright (C) 2003 by David White <address@hidden>
                  2004 by Guillaume Melquiond <address@hidden>
@@ -273,9 +273,9 @@
                bool on_grip = point_in_rect(e.x, e.y, grip);
                bool on_groove = point_in_rect(e.x, e.y, groove);
                if (on_groove && e.button == SDL_BUTTON_WHEELDOWN) {
-                       move_position(1);
+                       move_position(scroll_rate_);
                } else if (on_groove && e.button == SDL_BUTTON_WHEELUP) {
-                       move_position(-1);
+                       move_position(-scroll_rate_);
                } else if (on_grip && e.button == SDL_BUTTON_LEFT) {
                        mousey_on_grip_ = e.y - grip.y;
                        new_state = DRAGGED;
Index: wesnoth/src/widgets/textbox.cpp
diff -u wesnoth/src/widgets/textbox.cpp:1.76 
wesnoth/src/widgets/textbox.cpp:1.77
--- wesnoth/src/widgets/textbox.cpp:1.76        Wed Apr 20 17:27:39 2005
+++ wesnoth/src/widgets/textbox.cpp     Fri Apr 22 22:47:25 2005
@@ -1,4 +1,4 @@
-/* $Id: textbox.cpp,v 1.76 2005/04/20 17:27:39 ott Exp $ */
+/* $Id: textbox.cpp,v 1.77 2005/04/22 22:47:25 silene Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -336,6 +336,8 @@
 
 void textbox::handle_event(const SDL_Event& event)
 {
+       scrollarea::handle_event(event);
+
        bool changed = false;
        
        //Sanity check: verify that selection start and end are within text




reply via email to

[Prev in Thread] Current Thread [Next in Thread]