1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 02:05:13 +01:00

TrackList window: make 'select other ride' button available in track manager

This commit is contained in:
Aaron van Geffen
2025-03-31 16:43:26 +02:00
parent 3747fd70d4
commit 31b65ddb84
2 changed files with 14 additions and 13 deletions

View File

@@ -5,6 +5,7 @@
- Feature: [#23876] New park save files now contain a preview image, shown in the load/save window.
- Change: [#23932] The land rights window now checks “Land Owned” by default.
- Change: [#23936] The guests prefer less/more intense rides settings have been turned into a dropdown.
- Change: [#24059] The select other ride button is now available in the track manager.
- Change: [#24067] [Plugin] Registered menu items are now listed alphabetically.
- Change: [#24070] Footpath selection menus now show object names on hover using a tooltip.
- Change: [#24101] Frozen peeps are no longer removed when using the 'remove all guests' cheat.

View File

@@ -221,15 +221,6 @@ namespace OpenRCT2::Ui::Windows
LoadDesignsList(_window_track_list_item);
if (gLegacyScene == LegacyScene::trackDesignsManager)
{
widgets[WIDX_BACK].type = WindowWidgetType::Empty;
}
else
{
widgets[WIDX_BACK].type = WindowWidgetType::TableHeader;
}
WindowInitScrollWidgets(*this);
_selectedItemIsBeingUpdated = false;
_reloadTrackDesigns = false;
@@ -248,6 +239,14 @@ namespace OpenRCT2::Ui::Windows
_loadedTrackDesignIndex = TRACK_DESIGN_INDEX_UNLOADED;
}
void ReopenTrackManager()
{
auto* windowMgr = Ui::GetWindowManager();
windowMgr->CloseByNumber(WindowClass::ManageTrackDesign, number);
windowMgr->CloseByNumber(WindowClass::TrackDeletePrompt, number);
Editor::LoadTrackManager();
}
void OnClose() override
{
// Dispose track design and preview
@@ -265,10 +264,7 @@ namespace OpenRCT2::Ui::Windows
// try to load the track manager again, and an infinite loop will result.
if ((gLegacyScene == LegacyScene::trackDesignsManager) && gScreenAge != 0)
{
auto* windowMgr = Ui::GetWindowManager();
windowMgr->CloseByNumber(WindowClass::ManageTrackDesign, number);
windowMgr->CloseByNumber(WindowClass::TrackDeletePrompt, number);
Editor::LoadTrackManager();
ReopenTrackManager();
}
}
@@ -295,6 +291,10 @@ namespace OpenRCT2::Ui::Windows
{
ContextOpenWindow(WindowClass::ConstructRide);
}
else
{
ReopenTrackManager();
}
break;
case WIDX_FILTER_STRING:
WindowStartTextbox(*this, widgetIndex, _filterString, sizeof(_filterString));