mirror of https://github.com/OpenRCT2/OpenRCT2.git
Close #6024: Closing object selection now advances to next step
In the scenario editor and track designer X button in object selector will now close the object selector window and advance to the next stage instead of closing the scenario editor and track editor entirely and returning to the main menu. Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
This commit is contained in:
parent
295a98028e
commit
37e9270c00
|
@ -43,6 +43,7 @@
|
|||
- Fix: [#11258] Properly remove format codes from imported strings.
|
||||
- Fix: [#11286] Fix banner tooltip colour.
|
||||
- Fix: Small red gardens in RCT1 saves are imported in the wrong colour.
|
||||
- Improved: [#6024] The close button in the object selection now advances to the next step.
|
||||
- Improved: [#11157] Slimmer virtual floor lines.
|
||||
|
||||
0.2.5 (2020-03-24)
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <openrct2-ui/windows/Window.h>
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/Editor.h>
|
||||
#include <openrct2/EditorObjectSelectionSession.h>
|
||||
#include <openrct2/Game.h>
|
||||
#include <openrct2/Input.h>
|
||||
#include <openrct2/OpenRCT2.h>
|
||||
|
@ -225,21 +226,14 @@ void window_editor_bottom_toolbar_jump_forward_from_object_selection()
|
|||
if (!window_editor_bottom_toolbar_check_object_selection())
|
||||
return;
|
||||
|
||||
finish_object_selection();
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
{
|
||||
set_every_ride_type_invented();
|
||||
set_every_ride_entry_invented();
|
||||
context_open_window(WC_CONSTRUCT_RIDE);
|
||||
gS6Info.editor_step = EDITOR_STEP_ROLLERCOASTER_DESIGNER;
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
else
|
||||
{
|
||||
set_all_scenery_items_invented();
|
||||
scenery_set_default_placement_configuration();
|
||||
gS6Info.editor_step = EDITOR_STEP_LANDSCAPE_EDITOR;
|
||||
context_open_window(WC_MAP);
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -462,15 +462,10 @@ static void window_editor_object_selection_mouseup(rct_window* w, rct_widgetinde
|
|||
switch (widgetIndex)
|
||||
{
|
||||
case WIDX_CLOSE:
|
||||
window_close(w);
|
||||
if (gScreenFlags & SCREEN_FLAGS_EDITOR)
|
||||
{
|
||||
auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::OpenSavePrompt, PM_SAVE_BEFORE_QUIT);
|
||||
GameActions::Execute(&loadOrQuitAction);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Used for in-game object selection cheat
|
||||
window_close(w);
|
||||
finish_object_selection();
|
||||
}
|
||||
break;
|
||||
case WIDX_FILTER_RIDE_TAB_ALL:
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "object/ObjectManager.h"
|
||||
#include "object/ObjectRepository.h"
|
||||
#include "ride/RideData.h"
|
||||
#include "scenario/Scenario.h"
|
||||
#include "windows/Intent.h"
|
||||
#include "world/Footpath.h"
|
||||
#include "world/LargeScenery.h"
|
||||
|
@ -375,6 +376,24 @@ void reset_selected_object_count_and_size()
|
|||
}
|
||||
}
|
||||
|
||||
void finish_object_selection()
|
||||
{
|
||||
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)
|
||||
{
|
||||
set_every_ride_type_invented();
|
||||
set_every_ride_entry_invented();
|
||||
gS6Info.editor_step = EDITOR_STEP_ROLLERCOASTER_DESIGNER;
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
else
|
||||
{
|
||||
set_all_scenery_items_invented();
|
||||
scenery_set_default_placement_configuration();
|
||||
gS6Info.editor_step = EDITOR_STEP_LANDSCAPE_EDITOR;
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Master objects are objects that are not
|
||||
* optional / required dependants of an
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
enum INPUT_FLAGS
|
||||
enum EDITOR_INPUT_FLAGS
|
||||
{
|
||||
INPUT_FLAG_EDITOR_OBJECT_1 = (1 << 1),
|
||||
INPUT_FLAG_EDITOR_OBJECT_2 = (1 << 2),
|
||||
|
@ -30,6 +30,7 @@ void editor_object_flags_free();
|
|||
void unload_unselected_objects();
|
||||
void sub_6AB211();
|
||||
void reset_selected_object_count_and_size();
|
||||
void finish_object_selection();
|
||||
int32_t window_editor_object_selection_select_object(uint8_t bh, int32_t flags, const rct_object_entry* entry);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue