summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-11-07 14:41:53 +0000
committerDarkvater <darkvater@openttd.org>2006-11-07 14:41:53 +0000
commitc4e4fa98fde0570e9f45050e286fca17de7113b6 (patch)
tree1ca4455b3b05bde3c479f06083d15648630668d7 /main_gui.c
parent745a5b8cc3df16b8734f50eb08a3e017f89d3273 (diff)
downloadopenttd-c4e4fa98fde0570e9f45050e286fca17de7113b6.tar.xz
(svn r7098) -Regression (r7094): Zoom buttons were not properly updated with a new/loaded game. The
good thing is, we got rid of even more magic code (tm)
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/main_gui.c b/main_gui.c
index 879618953..bf34a9330 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -879,7 +879,6 @@ bool DoZoomInOutWindow(int how, Window *w)
vp->virtual_width <<= 1;
vp->virtual_height <<= 1;
break;
- default: return false;
}
SetWindowDirty(w);
@@ -2413,13 +2412,9 @@ void ShowVitalWindows(void)
{
Window *w;
- if (_game_mode != GM_EDITOR) {
- w = AllocateWindowDesc(&_toolb_normal_desc);
- DisableWindowWidget(w, 18);
- } else {
- w = AllocateWindowDesc(&_toolb_scen_desc);
- DisableWindowWidget(w, 10);
- }
+ w = AllocateWindowDesc((_game_mode != GM_EDITOR) ? &_toolb_normal_desc : &_toolb_scen_desc);
+ DoZoomInOutWindow(ZOOM_NONE, w);
+
CLRBITS(w->flags4, WF_WHITE_BORDER_MASK);
SetWindowWidgetDisabledState(w, 0, _networking && !_network_server); // if not server, disable pause button