Skip to content

Commit

Permalink
Correctly initialize the campaign creator UI the first time it is dis…
Browse files Browse the repository at this point in the history
…played.
  • Loading branch information
Aessi committed May 14, 2019
1 parent a15423f commit effcd55
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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]);
Expand Down Expand Up @@ -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();
}
}
}
}

0 comments on commit effcd55

Please sign in to comment.