mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 14:54:30 +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,7 +13,6 @@
|
||||
#include <openrct2-ui/interface/Theme.h>
|
||||
#include <openrct2-ui/interface/Widget.h>
|
||||
#include <openrct2-ui/windows/Window.h>
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/Game.h>
|
||||
#include <openrct2/GameState.h>
|
||||
#include <openrct2/OpenRCT2.h>
|
||||
@@ -24,6 +23,7 @@
|
||||
#include <openrct2/localisation/Localisation.Date.h>
|
||||
#include <openrct2/network/network.h>
|
||||
#include <openrct2/sprites.h>
|
||||
#include <openrct2/ui/WindowManager.h>
|
||||
#include <openrct2/world/Climate.h>
|
||||
#include <openrct2/world/Park.h>
|
||||
|
||||
@@ -249,9 +249,10 @@ namespace OpenRCT2::Ui::Windows
|
||||
|
||||
WindowBase* TransparencyOpen()
|
||||
{
|
||||
auto* window = WindowBringToFrontByClass(WindowClass::Transparency);
|
||||
auto* windowMgr = GetWindowManager();
|
||||
auto* window = windowMgr->BringToFrontByClass(WindowClass::Transparency);
|
||||
if (window == nullptr)
|
||||
window = WindowCreate<TransparencyWindow>(WindowClass::Transparency, ScreenCoordsXY(32, 32), WW, WH);
|
||||
window = windowMgr->Create<TransparencyWindow>(WindowClass::Transparency, ScreenCoordsXY(32, 32), WW, WH);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user