MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / MainWindowZoom

Function MainWindowZoom

src/openrct2-ui/interface/Window.cpp:1078–1097  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1076 }
1077
1078 void MainWindowZoom(bool zoomIn, bool atCursor)
1079 {
1080 auto* mainWindow = WindowGetMain();
1081 if (mainWindow == nullptr)
1082 return;
1083
1084 if (gLegacyScene == LegacyScene::titleSequence)
1085 return;
1086
1087 if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != Editor::Step::landscapeEditor)
1088 return;
1089
1090 if (gLegacyScene == LegacyScene::trackDesignsManager)
1091 return;
1092
1093 if (zoomIn)
1094 WindowZoomIn(*mainWindow, atCursor);
1095 else
1096 WindowZoomOut(*mainWindow, atCursor);
1097 }
1098} // namespace OpenRCT2::Ui::Windows

Callers 1

ProcessMessagesFunction · 0.85

Calls 3

WindowGetMainFunction · 0.85
WindowZoomInFunction · 0.85
WindowZoomOutFunction · 0.85

Tested by

no test coverage detected