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
commit65e051fe93d12d0cc53258e047b6bf86f47c9ce7 (patch)
tree99bc81d869567e52619264b8aa261b56be9836eb /genworld.c
parente90bc1681f4b9cdd2a726332113d161f69217ff4 (diff)
downloadopenttd-65e051fe93d12d0cc53258e047b6bf86f47c9ce7.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();
}