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

Function windowFitsOnScreen

src/OpenLoco/src/Ui/WindowManager.cpp:530–551  ·  view source on GitHub ↗

0x004C9BA2

Source from the content-addressed store, hash-verified

528
529 // 0x004C9BA2
530 static bool windowFitsOnScreen(Ui::Point origin, Ui::Size size)
531 {
532 if (origin.x < -(size.width / 4))
533 {
534 return false;
535 }
536 if (origin.x > Ui::width() - (size.width / 2))
537 {
538 return false;
539 }
540
541 if (origin.y < 28)
542 {
543 return false;
544 }
545 if (origin.y > Ui::height() - (size.height / 4))
546 {
547 return false;
548 }
549
550 return windowFitsWithinSpace(origin, size);
551 }
552
553 /**
554 * 0x004C9C68

Callers 1

createWindowFunction · 0.85

Calls 3

widthFunction · 0.85
heightFunction · 0.85
windowFitsWithinSpaceFunction · 0.85

Tested by

no test coverage detected