(svn r9812) -Fix (r9679): Obiwan prevented proper display of last transparency button.
authorpeter1138
Mon, 07 May 2007 20:25:20 +0000
changeset 7094 623d0668e267
parent 7093 a4f71855817c
child 7095 0a13da1472cc
(svn r9812) -Fix (r9679): Obiwan prevented proper display of last transparency button.
src/transparency_gui.cpp
--- a/src/transparency_gui.cpp	Mon May 07 17:59:50 2007 +0000
+++ b/src/transparency_gui.cpp	Mon May 07 20:25:20 2007 +0000
@@ -23,6 +23,7 @@
 	TTW_WIDGET_BUILDINGS,    ///< Make player buildings and structures transparent
 	TTW_WIDGET_BRIDGES,      ///< Make bridges transparent
 	TTW_WIDGET_STRUCTURES,   ///< Make unmovable structures transparent
+	TTW_WIDGET_END,          ///< End of toggle buttons
 };
 
 /** Toggle the bits of the transparencies variable
@@ -41,7 +42,7 @@
 		case WE_PAINT:
 			/* must be sure that the widgets show the transparency variable changes
 			 * also when we use shortcuts */
-			for (uint i = TTW_WIDGET_SIGNS; i < TTW_WIDGET_STRUCTURES; i++) {
+			for (uint i = TTW_WIDGET_SIGNS; i < TTW_WIDGET_END; i++) {
 				SetWindowWidgetLoweredState(w, i, HASBIT(_transparent_opt, i - TTW_WIDGET_SIGNS));
 			}
 			DrawWindowWidgets(w);