From effcd552d19de8b722e8ad29d230b660ad95b0ba Mon Sep 17 00:00:00 2001 From: Eole Date: Tue, 14 May 2019 16:58:07 +0200 Subject: [PATCH] Correctly initialize the campaign creator UI the first time it is displayed. --- .../Component_Campaign/CampaignController.Script.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Makers/base/Scripts/Libs/Nadeo/MP4/TitlePackMaker/Components/Component_Campaign/CampaignController.Script.txt b/Makers/base/Scripts/Libs/Nadeo/MP4/TitlePackMaker/Components/Component_Campaign/CampaignController.Script.txt index 31a717a..c95d723 100644 --- a/Makers/base/Scripts/Libs/Nadeo/MP4/TitlePackMaker/Components/Component_Campaign/CampaignController.Script.txt +++ b/Makers/base/Scripts/Libs/Nadeo/MP4/TitlePackMaker/Components/Component_Campaign/CampaignController.Script.txt @@ -125,10 +125,10 @@ Void UpdateMaps() Campaign_Categories = CampaignAPI::GetCampaignCategories(); Campaign_NewTracks = CampaignAPI::GetNewTrackPatterns(G_SectionIndex); Campaign_WarningMaps = CampaignAPI::GetAllWarningMaps(G_SectionIndex); - LayerCustomEvent(MapsLayer, "GiveChooseTrackQuads", Text[]); + LayerCustomEvent(MapsLayer, "GiveChooseTrackQuads", []); LayerCustomEvent(MapsLayer, "ChangeSection", [TextLib::ToText(G_SectionIndex)]); Campaign_WarningCategories = CampaignAPI::GetWarningSections(); - LayerCustomEvent(CategoriesLayer, "UpdateCategories", Text[]); + LayerCustomEvent(CategoriesLayer, "UpdateCategories", []); } Void UpdateForm() @@ -239,7 +239,7 @@ Void Loop() { TitleFlow.EditGhosts(MapPath); } case "Campaign_Move": { - LayerCustomEvent(Layers::Get("CampaignMaps"), "StartMovingAllCards", Text[]); + LayerCustomEvent(Layers::Get("CampaignMaps"), "StartMovingAllCards", []); } case "Campaign_FinishMovingCard": { declare Integer MoveSecStart = TextLib::ToInteger(Event.CustomEventData[0]); @@ -324,8 +324,13 @@ Void Loop() { UpdateForm(); } case "SoloSettings": { + UpdateForm(); Pages::GotoNext("CampaignSettings"); } + // It's somewhat hacky, but this event is received when showing the solo UI + case "DetachPage": { + UpdateMaps(); + } } } } \ No newline at end of file