summaryrefslogtreecommitdiff
path: root/genworld.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-11-07 13:06:02 +0000
committerDarkvater <Darkvater@openttd.org>2006-11-07 13:06:02 +0000
commit3a2c773411ccabaaa87130a8499bda4995588a54 (patch)
tree99bc81d869567e52619264b8aa261b56be9836eb /genworld.c
parent501fcb3465bc95744dcc78461d71e822e9c4d5cd (diff)
downloadopenttd-3a2c773411ccabaaa87130a8499bda4995588a54.tar.xz
(svn r7094) -Codechange: Get rid of the window-specific code in DoZoomInOutWindow (enable, disable
buttons depending on calling window, game-mode); handle it by broadcasting messages to the calling window, because that knows how and what buttons to set.
Diffstat (limited to 'genworld.c')
-rw-r--r--genworld.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/genworld.c b/genworld.c
index ae29cddde..51bf8d246 100644
--- a/genworld.c
+++ b/genworld.c
@@ -260,14 +260,11 @@ void GenerateWorld(int mode, uint size_x, uint size_y)
ShowGenerateWorldProgress();
}
- /* Zoom out and center on the map (is pretty ;)) */
+ /* Hide vital windows, because we don't allow to use them */
+ if (_gw.thread != NULL) HideVitalWindows();
+
+ /* Centre the view on the map */
if (FindWindowById(WC_MAIN_WINDOW, 0) != NULL) {
- while (DoZoomInOutWindow(ZOOM_OUT, FindWindowById(WC_MAIN_WINDOW, 0) ) ) {}
ScrollMainWindowToTile(TileXY(MapSizeX() / 2, MapSizeY() / 2));
}
-
- /* Hide vital windows, because we don't allow to use them */
- /* XXX -- Ideal it is done after ShowGenerateWorldProgress, but stupid
- * enough, DoZoomInOutWindow _needs_ the toolbar to exist... */
- if (_gw.thread != NULL) HideVitalWindows();
}