| 415 | } |
| 416 | |
| 417 | WindowBase* ScWindow::GetWindow(JSValue thisVal) |
| 418 | { |
| 419 | OpaqueWindowData* data = gScWindow.GetOpaque<OpaqueWindowData*>(thisVal); |
| 420 | if (!data) |
| 421 | return nullptr; |
| 422 | auto* windowMgr = Ui::GetWindowManager(); |
| 423 | return windowMgr->FindByNumber(data->_class, data->_number); |
| 424 | } |
| 425 | } // namespace OpenRCT2::Scripting |
| 426 | |
| 427 | #endif |
no test coverage detected