mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 14:54:30 +01:00
Remove Editor Main (#17348)
* Remove editor main window * Remove editor main completely * Update src/openrct2/Editor.cpp Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com> Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
This commit is contained in:
@@ -89,6 +89,14 @@ namespace Editor
|
||||
}
|
||||
}
|
||||
|
||||
static rct_window* OpenEditorWindows()
|
||||
{
|
||||
auto* main = context_open_window(WC_MAIN_WINDOW);
|
||||
context_open_window(WC_TOP_TOOLBAR);
|
||||
context_open_window_view(WV_EDITOR_BOTTOM_TOOLBAR);
|
||||
return main;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x0066FFE1
|
||||
@@ -103,7 +111,7 @@ namespace Editor
|
||||
gParkFlags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
gScenarioCategory = SCENARIO_CATEGORY_OTHER;
|
||||
viewport_init_all();
|
||||
rct_window* mainWindow = context_open_window_view(WV_EDITOR_MAIN);
|
||||
rct_window* mainWindow = OpenEditorWindows();
|
||||
mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
|
||||
load_palette();
|
||||
gScreenAge = 0;
|
||||
@@ -142,7 +150,7 @@ namespace Editor
|
||||
gEditorStep = EditorStep::ObjectiveSelection;
|
||||
gScenarioCategory = SCENARIO_CATEGORY_OTHER;
|
||||
viewport_init_all();
|
||||
context_open_window_view(WV_EDITOR_MAIN);
|
||||
OpenEditorWindows();
|
||||
FinaliseMainView();
|
||||
gScreenAge = 0;
|
||||
}
|
||||
@@ -163,7 +171,7 @@ namespace Editor
|
||||
SetAllLandOwned();
|
||||
gEditorStep = EditorStep::ObjectSelection;
|
||||
viewport_init_all();
|
||||
rct_window* mainWindow = context_open_window_view(WV_EDITOR_MAIN);
|
||||
rct_window* mainWindow = OpenEditorWindows();
|
||||
mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
|
||||
load_palette();
|
||||
}
|
||||
@@ -184,7 +192,7 @@ namespace Editor
|
||||
SetAllLandOwned();
|
||||
gEditorStep = EditorStep::ObjectSelection;
|
||||
viewport_init_all();
|
||||
rct_window* mainWindow = context_open_window_view(WV_EDITOR_MAIN);
|
||||
rct_window* mainWindow = OpenEditorWindows();
|
||||
mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ());
|
||||
load_palette();
|
||||
}
|
||||
@@ -246,7 +254,7 @@ namespace Editor
|
||||
gScreenAge = 0;
|
||||
gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
viewport_init_all();
|
||||
context_open_window_view(WV_EDITOR_MAIN);
|
||||
OpenEditorWindows();
|
||||
FinaliseMainView();
|
||||
return true;
|
||||
}
|
||||
@@ -260,7 +268,7 @@ namespace Editor
|
||||
gScreenAge = 0;
|
||||
gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
viewport_init_all();
|
||||
context_open_window_view(WV_EDITOR_MAIN);
|
||||
OpenEditorWindows();
|
||||
FinaliseMainView();
|
||||
return true;
|
||||
}
|
||||
@@ -290,7 +298,7 @@ namespace Editor
|
||||
gScreenAge = 0;
|
||||
gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
viewport_init_all();
|
||||
context_open_window_view(WV_EDITOR_MAIN);
|
||||
OpenEditorWindows();
|
||||
FinaliseMainView();
|
||||
return true;
|
||||
}
|
||||
@@ -311,7 +319,7 @@ namespace Editor
|
||||
gScreenAge = 0;
|
||||
gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
viewport_init_all();
|
||||
context_open_window_view(WV_EDITOR_MAIN);
|
||||
OpenEditorWindows();
|
||||
FinaliseMainView();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user