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

Function findWindowShowing

src/OpenLoco/src/Ui/WindowManager.cpp:1396–1421  ·  view source on GitHub ↗

0x0046960C

Source from the content-addressed store, hash-verified

1394
1395 // 0x0046960C
1396 Ui::Window* findWindowShowing(const viewport_pos& position)
1397 {
1398 for (auto it = _windows.rbegin(); it != _windows.rend(); it++)
1399 {
1400 auto& w = *it;
1401 if (w.viewports[0] == nullptr)
1402 {
1403 continue;
1404 }
1405
1406 auto viewport = w.viewports[0];
1407 if (viewport->zoom != 0)
1408 {
1409 continue;
1410 }
1411
1412 if (!viewport->contains(position))
1413 {
1414 continue;
1415 }
1416
1417 return &w;
1418 }
1419
1420 return nullptr;
1421 }
1422
1423 /**
1424 * 0x004C6A40

Callers 1

createWaveFunction · 0.85

Calls 3

rbeginMethod · 0.80
rendMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected