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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user