| 573 | }; |
| 574 | |
| 575 | WindowBase* ObjectLoadErrorOpen(utf8* path, size_t numMissingObjects, const ObjectEntryDescriptor* missingObjects) |
| 576 | { |
| 577 | // Check if window is already open |
| 578 | auto* windowMgr = GetWindowManager(); |
| 579 | auto* window = windowMgr->BringToFrontByClass(WindowClass::objectLoadError); |
| 580 | if (window == nullptr) |
| 581 | { |
| 582 | window = windowMgr->Create<ObjectLoadErrorWindow>(WindowClass::objectLoadError, kWindowSize, {}); |
| 583 | } |
| 584 | |
| 585 | static_cast<ObjectLoadErrorWindow*>(window)->initialise(path, numMissingObjects, missingObjects); |
| 586 | |
| 587 | return window; |
| 588 | } |
| 589 | } // namespace OpenRCT2::Ui::Windows |
no test coverage detected