public static void CreateMenu(EverestModule everestModule, TextMenu menu, bool inGame) { List <TextMenuExt.EaseInSubHeaderExt> enabledDescriptions = new(); TextMenuExt.EaseInSubHeaderExt AddEnabledDescription(TextMenu.Item enabledItem, TextMenu containingMenu, string description) { TextMenuExt.EaseInSubHeaderExt descriptionText = new(description, false, containingMenu) { TextColor = Color.Gray, HeightExtra = 0f }; List <TextMenu.Item> items = containingMenu.GetItems(); if (items.Contains(enabledItem)) { containingMenu.Insert(items.IndexOf(enabledItem) + 1, descriptionText); } enabledItem.OnEnter += () => descriptionText.FadeVisible = Settings.Enabled; enabledItem.OnLeave += () => descriptionText.FadeVisible = false; return(descriptionText); } TextMenu.Item enabledItem = new TextMenu.OnOff("Enabled".ToDialogText(), Settings.Enabled).Change((value) => { Settings.Enabled = value; foreach (EaseInSubMenu easeInSubMenu in options) { easeInSubMenu.FadeVisible = value; } foreach (TextMenuExt.EaseInSubHeaderExt easeInSubHeader in enabledDescriptions) { easeInSubHeader.FadeVisible = value; } }); menu.Add(enabledItem); CreateOptions(everestModule, menu, inGame); foreach (EaseInSubMenu easeInSubMenu in options) { menu.Add(easeInSubMenu); } foreach (string text in Split(InputController.TasFilePath, 60).Reverse()) { enabledDescriptions.Add(AddEnabledDescription(enabledItem, menu, text)); } enabledDescriptions.Add(AddEnabledDescription(enabledItem, menu, "Enabled Description".ToDialogText())); HitboxMenu.AddSubMenuDescription(menu, inGame); InfoHud.AddSubMenuDescription(menu); hotkeysSubMenu.AddDescription(menu, "Hotkeys Description".ToDialogText()); }
private static void CreateOptions(EverestModule everestModule, TextMenu menu, bool inGame) { options = new List <EaseInSubMenu> { HitboxMenu.CreateSubMenu(menu, inGame), SimplifiedGraphicsFeature.CreateSubMenu(), InfoHud.CreateSubMenu(), CreateRoundValuesSubMenu(), CreateRelaunchSubMenu(), CreateHotkeysSubMenu(everestModule, menu), CreateMoreOptionsSubMenu(), }; }