forked from mirror/OpenTTD
(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.
This commit is contained in:
11
genworld.c
11
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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user