1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 14:54:30 +01:00

Move WindowFind functions into WindowManager (#23517)

* Move WindowFind* functions into WindowManager

* Update parameter documentation where applicable
This commit is contained in:
Aaron van Geffen
2025-01-08 21:12:11 +01:00
committed by GitHub
parent a8ef595248
commit aa45247f21
58 changed files with 657 additions and 354 deletions

View File

@@ -1097,7 +1097,8 @@ namespace OpenRCT2::Ui::Windows
static rct_windownumber GetNewWindowNumber()
{
auto result = _nextWindowNumber++;
while (WindowFindByNumber(WindowClass::Custom, result) != nullptr)
auto* windowMgr = GetContext()->GetUiContext()->GetWindowManager();
while (windowMgr->FindByNumber(WindowClass::Custom, result) != nullptr)
{
result++;
}