mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 00:04:43 +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:
@@ -14,6 +14,7 @@
|
||||
#include <openrct2-ui/windows/Window.h>
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/ui/WindowManager.h>
|
||||
#include <openrct2/world/Footpath.h>
|
||||
|
||||
namespace OpenRCT2::Ui::Windows
|
||||
@@ -75,7 +76,8 @@ namespace OpenRCT2::Ui::Windows
|
||||
*/
|
||||
WindowBase* MainOpen()
|
||||
{
|
||||
return WindowCreate<MainWindow>(
|
||||
auto* windowMgr = GetWindowManager();
|
||||
return windowMgr->Create<MainWindow>(
|
||||
WindowClass::MainWindow, { 0, 0 }, ContextGetWidth(), ContextGetHeight(), WF_STICK_TO_BACK);
|
||||
}
|
||||
} // namespace OpenRCT2::Ui::Windows
|
||||
|
||||
Reference in New Issue
Block a user