mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 22:34:33 +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:
@@ -13,6 +13,7 @@
|
||||
#include <openrct2/Version.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/interface/Colour.h>
|
||||
#include <openrct2/ui/WindowManager.h>
|
||||
|
||||
namespace OpenRCT2::Ui::Windows
|
||||
{
|
||||
@@ -39,10 +40,11 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
WindowBase* TitleVersionOpen()
|
||||
{
|
||||
auto* window = WindowBringToFrontByClass(WindowClass::TitleVersion);
|
||||
auto* windowMgr = GetWindowManager();
|
||||
auto* window = windowMgr->BringToFrontByClass(WindowClass::TitleVersion);
|
||||
if (window == nullptr)
|
||||
{
|
||||
window = WindowCreate<TitleVersionWindow>(
|
||||
window = windowMgr->Create<TitleVersionWindow>(
|
||||
WindowClass::TitleVersion, ScreenCoordsXY(kTextOffset, ContextGetHeight() - 30), WW, WH,
|
||||
WF_STICK_TO_BACK | WF_TRANSPARENT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user