Merge branch 'master' into jgrpp-beta
# Conflicts: # src/lang/chuvash.txt # src/lang/czech.txt # src/lang/english_AU.txt # src/lang/english_US.txt # src/lang/german.txt # src/lang/japanese.txt # src/lang/korean.txt # src/lang/latvian.txt # src/lang/russian.txt # src/tree_gui.cpp # src/vehicle.cpp
This commit is contained in:
@@ -178,12 +178,24 @@ void ZoomInOrOutToCursorWindow(bool in, Window *w)
|
||||
}
|
||||
}
|
||||
|
||||
void FixTitleGameZoom()
|
||||
void FixTitleGameZoom(int zoom_adjust)
|
||||
{
|
||||
if (_game_mode != GM_MENU) return;
|
||||
|
||||
Viewport *vp = FindWindowByClass(WC_MAIN_WINDOW)->viewport;
|
||||
|
||||
/* Adjust the zoom in/out.
|
||||
* Can't simply add, since operator+ is not defined on the ZoomLevel type. */
|
||||
vp->zoom = _gui_zoom;
|
||||
while (zoom_adjust < 0 && vp->zoom != ZOOM_LVL_MIN) {
|
||||
vp->zoom--;
|
||||
zoom_adjust++;
|
||||
}
|
||||
while (zoom_adjust > 0 && vp->zoom != ZOOM_LVL_MAX) {
|
||||
vp->zoom++;
|
||||
zoom_adjust--;
|
||||
}
|
||||
|
||||
vp->virtual_width = ScaleByZoom(vp->width, vp->zoom);
|
||||
vp->virtual_height = ScaleByZoom(vp->height, vp->zoom);
|
||||
UpdateViewportSizeZoom(vp);
|
||||
|
Reference in New Issue
Block a user