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

Method CloseTop

src/openrct2-ui/WindowManager.cpp:1047–1059  ·  view source on GitHub ↗

* Closes the top-most window * * rct2: 0x006E403C */

Source from the content-addressed store, hash-verified

1045 * rct2: 0x006E403C
1046 */
1047 void CloseTop() override
1048 {
1049 CloseByClass(WindowClass::dropdown);
1050
1051 if (gLegacyScene == LegacyScene::scenarioEditor)
1052 {
1053 if (getGameState().editorStep != Editor::Step::landscapeEditor)
1054 return;
1055 }
1056
1057 auto pred = [](WindowBase* w) -> bool { return !w->flags.hasAny(WindowFlag::stickToBack, WindowFlag::stickToFront); };
1058 CloseByCondition(pred, WindowCloseFlags::CloseSingle);
1059 }
1060
1061 /**
1062 * Closes all open windows

Callers 1

Calls 1

hasAnyMethod · 0.80

Tested by

no test coverage detected