1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 21:13:05 +01:00

Move WindowCreate and WindowFocusOrCreate into WindowManager (#23643)

* Move WindowBringToFront into WindowManager

* Move WindowCreate and WindowFocusOrCreate into WindowManager

* Cut back on Context/UiContext includes
This commit is contained in:
Aaron van Geffen
2025-01-19 10:58:28 +01:00
committed by GitHub
parent 66ede938f8
commit bed4d5bdca
113 changed files with 895 additions and 767 deletions

View File

@@ -18,6 +18,7 @@
#include <openrct2/drawing/Font.h>
#include <openrct2/interface/Screenshot.h>
#include <openrct2/localisation/Formatting.h>
#include <openrct2/ui/WindowManager.h>
namespace OpenRCT2::Ui::Windows
{
@@ -138,7 +139,9 @@ namespace OpenRCT2::Ui::Windows
windowPosition.y = std::clamp(windowPosition.y, 22, ContextGetHeight() - height - 40);
auto errorWindow = std::make_unique<ErrorWindow>(std::move(buffer), numLines, autoClose);
return WindowCreate(
auto* windowMgr = GetWindowManager();
return windowMgr->Create(
std::move(errorWindow), WindowClass::Error, windowPosition, width, height, WF_STICK_TO_FRONT | WF_TRANSPARENT);
}