diff options
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r-- | src/main_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 4d6f1a170..1d57f51aa 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -148,7 +148,7 @@ bool DoZoomInOutWindow(ZoomStateChange how, Window *w) break; case ZOOM_IN: - if (vp->zoom == ZOOM_LVL_MIN) return false; + if (vp->zoom <= _settings_client.gui.zoom_min) return false; vp->zoom = (ZoomLevel)((int)vp->zoom - 1); vp->virtual_width >>= 1; vp->virtual_height >>= 1; @@ -160,7 +160,7 @@ bool DoZoomInOutWindow(ZoomStateChange how, Window *w) w->viewport->follow_vehicle = INVALID_VEHICLE; break; case ZOOM_OUT: - if (vp->zoom == ZOOM_LVL_MAX) return false; + if (vp->zoom >= _settings_client.gui.zoom_max) return false; vp->zoom = (ZoomLevel)((int)vp->zoom + 1); w->viewport->scrollpos_x -= vp->virtual_width >> 1; @@ -188,7 +188,7 @@ void ZoomInOrOutToCursorWindow(bool in, Window *w) if (_game_mode != GM_MENU) { ViewPort *vp = w->viewport; - if ((in && vp->zoom == ZOOM_LVL_MIN) || (!in && vp->zoom == ZOOM_LVL_MAX)) return; + if ((in && vp->zoom <= _settings_client.gui.zoom_min) || (!in && vp->zoom >= _settings_client.gui.zoom_max)) return; Point pt = GetTileZoomCenterWindow(in, w); if (pt.x != -1) { @@ -313,7 +313,7 @@ struct MainWindow : Window case GHK_CENTER_ZOOM: { Point pt = GetTileBelowCursor(); if (pt.x != -1) { - bool instant = (num == GHK_CENTER_ZOOM && this->viewport->zoom != ZOOM_LVL_MIN); + bool instant = (num == GHK_CENTER_ZOOM && this->viewport->zoom != _settings_client.gui.zoom_min); if (num == GHK_CENTER_ZOOM) MaxZoomInOut(ZOOM_IN, this); ScrollMainWindowTo(pt.x, pt.y, -1, instant); } |