MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / createWindowOnScreen

Function createWindowOnScreen

src/OpenLoco/src/Ui/WindowManager.cpp:516–527  ·  view source on GitHub ↗

0x004C9F27

Source from the content-addressed store, hash-verified

514
515 // 0x004C9F27
516 static Window* createWindowOnScreen(
517 WindowType type,
518 Ui::Point origin,
519 Ui::Size size,
520 Ui::WindowFlags flags,
521 const WindowEventList& events)
522 {
523 origin.x = std::clamp<decltype(origin.x)>(origin.x, 0, std::max(0, Ui::width() - size.width));
524 origin.y = std::clamp<decltype(origin.y)>(origin.y, 28, std::max(28, Ui::height() - size.height));
525
526 return createWindow(type, origin, size, flags, events);
527 }
528
529 // 0x004C9BA2
530 static bool windowFitsOnScreen(Ui::Point origin, Ui::Size size)

Callers 1

createWindowFunction · 0.85

Calls 3

widthFunction · 0.85
heightFunction · 0.85
createWindowFunction · 0.70

Tested by

no test coverage detected