* * rct2: 0x0067009A */
| 352 | * rct2: 0x0067009A |
| 353 | */ |
| 354 | void OpenWindowsForCurrentStep() |
| 355 | { |
| 356 | if (!isInEditorMode()) |
| 357 | { |
| 358 | return; |
| 359 | } |
| 360 | |
| 361 | auto* windowMgr = Ui::GetWindowManager(); |
| 362 | |
| 363 | switch (getGameState().editorStep) |
| 364 | { |
| 365 | case Editor::Step::objectSelection: |
| 366 | if (windowMgr->FindByClass(WindowClass::editorObjectSelection) != nullptr) |
| 367 | { |
| 368 | return; |
| 369 | } |
| 370 | |
| 371 | if (windowMgr->FindByClass(WindowClass::installTrack) != nullptr) |
| 372 | { |
| 373 | return; |
| 374 | } |
| 375 | |
| 376 | if (gLegacyScene == LegacyScene::trackDesignsManager) |
| 377 | { |
| 378 | ObjectManagerUnloadAllObjects(); |
| 379 | } |
| 380 | |
| 381 | ContextOpenWindow(WindowClass::editorObjectSelection); |
| 382 | break; |
| 383 | case Editor::Step::inventionsListSetUp: |
| 384 | if (windowMgr->FindByClass(WindowClass::editorInventionList) != nullptr) |
| 385 | { |
| 386 | return; |
| 387 | } |
| 388 | |
| 389 | ContextOpenWindow(WindowClass::editorInventionList); |
| 390 | break; |
| 391 | case Editor::Step::optionsSelection: |
| 392 | case Editor::Step::objectiveSelection: |
| 393 | case Editor::Step::scenarioDetails: |
| 394 | if (windowMgr->FindByClass(WindowClass::editorScenarioOptions) != nullptr) |
| 395 | { |
| 396 | return; |
| 397 | } |
| 398 | |
| 399 | ContextOpenWindow(WindowClass::editorScenarioOptions); |
| 400 | break; |
| 401 | case Editor::Step::landscapeEditor: |
| 402 | case Editor::Step::saveScenario: |
| 403 | case Editor::Step::rollerCoasterDesigner: |
| 404 | case Editor::Step::designsManager: |
| 405 | case Editor::Step::invalid: |
| 406 | break; |
| 407 | } |
| 408 | } |
| 409 | |
| 410 | static void FinaliseMainView() |
| 411 | { |
no test coverage detected