Skip to content

Commit

Permalink
fix incorrect title screen fade-in order
Browse files Browse the repository at this point in the history
  • Loading branch information
misternebula committed Sep 10, 2023
1 parent 271b195 commit 660e0e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/OWML.ModHelper.Menus/NewMenuSystem/TitleMenuManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public SubmitAction CreateTitleButton(string text, int index, bool fromTop)
var newButton = Object.Instantiate(existingTitleButton.gameObject);
newButton.transform.parent = existingTitleButton.transform.parent;
newButton.transform.localScale = existingTitleButton.transform.localScale;
newButton.name = $"Button-{text}";

Object.Destroy(newButton.GetComponent<SubmitActionConfirm>());
var submitAction = newButton.AddComponent<SubmitAction>();
Expand All @@ -30,7 +31,7 @@ public SubmitAction CreateTitleButton(string text, int index, bool fromTop)
newButton.GetComponent<CanvasGroup>().alpha = 0;
var animController = GameObject.Find("TitleMenuManagers").GetComponent<TitleAnimationController>();
var list = animController._buttonFadeControllers.ToList();
list.Insert(newButton.transform.GetSiblingIndex() - 3, new CanvasGroupFadeController
list.Insert(newButton.transform.GetSiblingIndex() - 2, new CanvasGroupFadeController
{
group = newButton.GetComponent<CanvasGroup>()
});
Expand Down

0 comments on commit 660e0e3

Please sign in to comment.