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

Function NetworkStatusOpen

src/openrct2-ui/windows/NetworkStatus.cpp:127–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125 };
126
127 WindowBase* NetworkStatusOpen(const std::string& text, CloseCallback onClose)
128 {
129 ContextForceCloseWindowByClass(WindowClass::progressWindow);
130
131 auto* windowMgr = GetWindowManager();
132
133 NetworkStatusWindow* window;
134 if ((window = static_cast<NetworkStatusWindow*>(windowMgr->FindByClass(WindowClass::networkStatus))) != nullptr)
135 {
136 windowMgr->BringToFront(*window);
137 }
138 else
139 {
140 window = windowMgr->Create<NetworkStatusWindow>(
141 WindowClass::networkStatus, kWindowSize,
142 { WindowFlag::higherContrastOnPress, WindowFlag::transparent, WindowFlag::centreScreen,
143 WindowFlag::stickToFront });
144 }
145
146 window->setCloseCallBack(onClose);
147 window->setWindowNetworkStatusText(text);
148 return window;
149 }
150
151 // force close
152 void WindowNetworkStatusClose()

Callers 1

OpenIntentMethod · 0.85

Calls 6

GetWindowManagerFunction · 0.85
setCloseCallBackMethod · 0.80
FindByClassMethod · 0.45
BringToFrontMethod · 0.45

Tested by

no test coverage detected