diff options
author | truelight <truelight@openttd.org> | 2007-05-15 16:08:46 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-05-15 16:08:46 +0000 |
commit | 765c466b8d5f9a534f785a14b4c41e36e07ae014 (patch) | |
tree | 839525ed601a24ac844e1fb9f64be11f2890b982 /src/main_gui.cpp | |
parent | d4963476cb0226490143e9843df897f792feacb2 (diff) | |
download | openttd-765c466b8d5f9a534f785a14b4c41e36e07ae014.tar.xz |
(svn r9846) -Codechange: introduced ZOOM_LVL_MIN and ZOOM_LVL_MAX for the obvious reasons
-Codechange: introduced ZOOM_LVL_DETAIL to show/remove details
-Codechange: changed << and >> operator with ZoomLevel to a simple wrapper (that in theory also allows zoom-in besides the current zoom-out)
-Fix r9845: missed some int -> ZoomLevel
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r-- | src/main_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index b090e69df..5fc4b3f97 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -880,7 +880,7 @@ bool DoZoomInOutWindow(int how, Window *w) switch (how) { case ZOOM_IN: - if (vp->zoom == ZOOM_LVL_NORMAL) return false; + if (vp->zoom == ZOOM_LVL_MIN) return false; vp->zoom = (ZoomLevel)((byte)vp->zoom - 1); vp->virtual_width >>= 1; vp->virtual_height >>= 1; @@ -889,7 +889,7 @@ bool DoZoomInOutWindow(int how, Window *w) WP(w,vp_d).scrollpos_y += vp->virtual_height >> 1; break; case ZOOM_OUT: - if (vp->zoom == ZOOM_LVL_OUT_4X) return false; + if (vp->zoom == ZOOM_LVL_MAX) return false; vp->zoom = (ZoomLevel)((byte)vp->zoom + 1); WP(w,vp_d).scrollpos_x -= vp->virtual_width >> 1; @@ -1049,7 +1049,7 @@ void ZoomInOrOutToCursorWindow(bool in, Window *w) vp = w->viewport; if (_game_mode != GM_MENU) { - if ((in && vp->zoom == ZOOM_LVL_NORMAL) || (!in && vp->zoom == ZOOM_LVL_OUT_4X)) + if ((in && vp->zoom == ZOOM_LVL_MIN) || (!in && vp->zoom == ZOOM_LVL_MAX)) return; pt = GetTileZoomCenterWindow(in,w); |