summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-05-07 20:25:20 +0000
committerpeter1138 <peter1138@openttd.org>2007-05-07 20:25:20 +0000
commite0a276c1a2c82ade890aff0729dca05bee1aba70 (patch)
tree205f849823cb0c98d792516aed6d2e0d0bc11dab
parente52a953e9970e39e6e8dd951b97414f2807317a6 (diff)
downloadopenttd-e0a276c1a2c82ade890aff0729dca05bee1aba70.tar.xz
(svn r9812) -Fix (r9679): Obiwan prevented proper display of last transparency button.
-rw-r--r--src/transparency_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/transparency_gui.cpp b/src/transparency_gui.cpp
index a797e1487..01fc4ab13 100644
--- a/src/transparency_gui.cpp
+++ b/src/transparency_gui.cpp
@@ -23,6 +23,7 @@ enum TransparencyToolbarWidgets{
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 @@ static void TransparencyToolbWndProc(Window *w, WindowEvent *e)
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);