MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / IsOpen

Method IsOpen

src/script/api/script_window.cpp:32–43  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

30}
31
32/* static */ bool ScriptWindow::IsOpen(WindowClass window, SQInteger number)
33{
34 if (ScriptGame::IsMultiplayer()) return false;
35
36 if (number == NUMBER_ALL) {
37 return (FindWindowByClass((::WindowClass)window) != nullptr);
38 }
39
40 number = Clamp<SQInteger>(number, 0, INT32_MAX);
41
42 return FindWindowById((::WindowClass)window, number) != nullptr;
43}
44
45/* static */ void ScriptWindow::Highlight(WindowClass window, SQInteger number, SQInteger widget, TextColour colour)
46{

Callers

nothing calls this directly

Calls 2

FindWindowByClassFunction · 0.85
FindWindowByIdFunction · 0.85

Tested by

no test coverage detected