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

Method GetWindow

src/openrct2-ui/scripting/ScWindow.cpp:417–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

OpenGLDrawingEngineMethod · 0.45

Calls 2

GetWindowManagerFunction · 0.85
FindByNumberMethod · 0.45

Tested by

no test coverage detected