forked from rosebudai/OpenRCT2-Web
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:
1 parent
66ede938f8
commit
bed4d5bdca
113 files changed
+895
-767
No files matched your search
@@ -27,6 +27,7 @@
|
||||
#include <openrct2/ride/RideManager.hpp>
|
||||
#include <openrct2/scenario/Scenario.h>
|
||||
#include <openrct2/sprites.h>
|
||||
#include <openrct2/ui/WindowManager.h>
|
||||
#include <openrct2/world/Park.h>
|
||||
|
||||
namespace OpenRCT2::Ui::Windows
|
||||
@@ -1169,11 +1170,12 @@ namespace OpenRCT2::Ui::Windows
|
||||
*/
|
||||
WindowBase* EditorObjectiveOptionsOpen()
|
||||
{
|
||||
auto window = WindowBringToFrontByClass(WindowClass::EditorObjectiveOptions);
|
||||
auto* windowMgr = GetWindowManager();
|
||||
auto* window = windowMgr->BringToFrontByClass(WindowClass::EditorObjectiveOptions);
|
||||
if (window != nullptr)
|
||||
return window;
|
||||
|
||||
window = WindowCreate<EditorObjectiveOptionsWindow>(
|
||||
window = windowMgr->Create<EditorObjectiveOptionsWindow>(
|
||||
WindowClass::EditorObjectiveOptions, 450, 225, WF_10 | WF_CENTRE_SCREEN);
|
||||
|
||||
return window;
|
||||
|
||||
Reference in new issue
Block a user