[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src/widgets menu.cpp
From: |
Guillaume Melquiond |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src/widgets menu.cpp |
Date: |
Wed, 29 Sep 2004 15:30:58 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Guillaume Melquiond <address@hidden> 04/09/29 19:23:54
Modified files:
src/widgets : menu.cpp
Log message:
Disabling scrollbar buttons instead of hiding them (#10504).
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/menu.cpp.diff?tr1=1.61&tr2=1.62&r1=text&r2=text
Patches:
Index: wesnoth/src/widgets/menu.cpp
diff -u wesnoth/src/widgets/menu.cpp:1.61 wesnoth/src/widgets/menu.cpp:1.62
--- wesnoth/src/widgets/menu.cpp:1.61 Fri Sep 24 23:25:09 2004
+++ wesnoth/src/widgets/menu.cpp Wed Sep 29 19:23:54 2004
@@ -448,9 +448,14 @@
}
// update enabled/disabled status for up/down buttons and the scrollbar
- scrollbar_.enable(nb_items > max_items);
- uparrow_.hide(first_item_on_screen_ == 0);
- downarrow_.hide(nb_items <= max_items || first_item_on_screen_ >=
nb_items - max_items);
+ bool enable_scrollbar = nb_items > max_items;
+ scrollbar_.enable(enable_scrollbar);
+ uparrow_.hide(!enable_scrollbar);
+ downarrow_.hide(!enable_scrollbar);
+ if (enable_scrollbar) {
+ uparrow_.enable(first_item_on_screen_ != 0);
+ downarrow_.enable(first_item_on_screen_ < nb_items - max_items);
+ }
if (!drawn_)
draw();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth/src/widgets menu.cpp,
Guillaume Melquiond <=