Make guidebook start with some entries collapsed (#16181)

This commit is contained in:
Leon Friedrich
2023-05-07 15:12:29 +12:00
committed by GitHub
parent d0a90e7e86
commit 883d6646ea
3 changed files with 21 additions and 6 deletions

View File

@@ -116,7 +116,7 @@ public sealed class GuidebookUIController : UIController, IOnStateEntered<LobbyS
}
/// <summary>
/// Opens the guidebook.
/// Opens or closes the guidebook.
/// </summary>
/// <param name="guides">What guides should be shown. If not specified, this will instead list all the entries</param>
/// <param name="rootEntries">A list of guides that should form the base of the table of contents. If not specified,
@@ -162,6 +162,11 @@ public sealed class GuidebookUIController : UIController, IOnStateEntered<LobbyS
}
_guideWindow.UpdateGuides(guides, rootEntries, forceRoot, selected);
// Expand up to depth-2.
_guideWindow.Tree.SetAllExpanded(false);
_guideWindow.Tree.SetAllExpanded(true, 1);
_guideWindow.OpenCenteredRight();
}