[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src/widgets button.cpp
From: |
Guillaume Melquiond |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src/widgets button.cpp |
Date: |
Sun, 31 Oct 2004 16:48:19 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Guillaume Melquiond <address@hidden> 04/10/31 21:42:56
Modified files:
src/widgets : button.cpp
Log message:
Fix a few problems with buttons. The old behavior of checkboxes
(dragging a click over them) is still available.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/button.cpp.diff?tr1=1.45&tr2=1.46&r1=text&r2=text
Patches:
Index: wesnoth/src/widgets/button.cpp
diff -u wesnoth/src/widgets/button.cpp:1.45 wesnoth/src/widgets/button.cpp:1.46
--- wesnoth/src/widgets/button.cpp:1.45 Sun Oct 31 20:50:13 2004
+++ wesnoth/src/widgets/button.cpp Sun Oct 31 21:42:56 2004
@@ -1,4 +1,4 @@
-/* $Id: button.cpp,v 1.45 2004/10/31 20:50:13 silene Exp $ */
+/* $Id: button.cpp,v 1.46 2004/10/31 21:42:56 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -228,7 +228,7 @@
// the cursor is not over the widget
if (state_ == PRESSED_ACTIVE)
state_ = PRESSED;
- else
+ else if (type_ != TYPE_CHECK || state_ != PRESSED)
state_ = NORMAL;
}
}
@@ -250,8 +250,10 @@
pressed_ = true;
break;
case TYPE_PRESS:
- state_ = ACTIVE;
- pressed_ = true;
+ if (state_ == PRESSED) {
+ state_ = ACTIVE;
+ pressed_ = true;
+ }
break;
case TYPE_TURBO:
state_ = ACTIVE;