Merge branch 'master' into jgrpp
# Conflicts: # CMakeLists.txt # src/saveload/town_sl.cpp # src/screenshot.h # src/script/api/ai/ai_date.hpp.sq # src/script/api/ai/ai_marine.hpp.sq # src/script/api/ai/ai_station.hpp.sq # src/script/api/game/game_date.hpp.sq # src/script/api/game/game_marine.hpp.sq # src/script/api/game/game_station.hpp.sq # src/script/api/game/game_window.hpp.sq # src/script/api/script_window.hpp # src/script/api/template/template_window.hpp.sq # src/signal.cpp # src/statusbar_gui.cpp # src/toolbar_gui.cpp # src/viewport.cpp # src/viewport_func.h
This commit is contained in:
@@ -110,7 +110,7 @@ void CcPlaySound_EXPLOSION(const CommandCost &result, TileIndex tile, uint32 p1,
|
||||
*/
|
||||
bool DoZoomInOutWindow(ZoomStateChange how, Window *w)
|
||||
{
|
||||
ViewPort *vp;
|
||||
Viewport *vp;
|
||||
|
||||
assert(w != nullptr);
|
||||
vp = w->viewport;
|
||||
@@ -164,7 +164,7 @@ void ZoomInOrOutToCursorWindow(bool in, Window *w)
|
||||
assert(w != nullptr);
|
||||
|
||||
if (_game_mode != GM_MENU) {
|
||||
ViewPort *vp = w->viewport;
|
||||
Viewport *vp = w->viewport;
|
||||
if ((in && vp->zoom <= _settings_client.gui.zoom_min) || (!in && vp->zoom >= _settings_client.gui.zoom_max)) return;
|
||||
|
||||
Point pt = GetTileZoomCenterWindow(in, w);
|
||||
@@ -180,7 +180,7 @@ void FixTitleGameZoom()
|
||||
{
|
||||
if (_game_mode != GM_MENU) return;
|
||||
|
||||
ViewPort *vp = FindWindowByClass(WC_MAIN_WINDOW)->viewport;
|
||||
Viewport *vp = FindWindowByClass(WC_MAIN_WINDOW)->viewport;
|
||||
vp->zoom = _gui_zoom;
|
||||
vp->virtual_width = ScaleByZoom(vp->width, vp->zoom);
|
||||
vp->virtual_height = ScaleByZoom(vp->height, vp->zoom);
|
||||
|
Reference in New Issue
Block a user