public override void CreateModMenuSection(TextMenu menu, bool inGame, EventInstance snapshot) { if (!inGame) { if (Everest.Updater.HasUpdate) { menu.Add(new TextMenu.Button(Dialog.Clean("modoptions_coremodule_update").Replace("((version))", Everest.Updater.Newest.Version.ToString())).Pressed(() => { Everest.Updater.Update(OuiModOptions.Instance.Overworld.Goto <OuiLoggedProgress>()); })); } // Allow downgrading travis / dev builds. if (Celeste.PlayMode == Celeste.PlayModes.Debug || Everest.VersionSuffix.StartsWith("travis-") || Everest.VersionSuffix == "dev") { menu.Add(new TextMenu.Button(Dialog.Clean("modoptions_coremodule_versionlist")).Pressed(() => { OuiModOptions.Instance.Overworld.Goto <OuiVersionList>(); })); } } base.CreateModMenuSection(menu, inGame, snapshot); menu.Add(new TextMenu.Button(Dialog.Clean("modoptions_coremodule_recrawl")).Pressed(() => { Everest.Content.Recrawl(); Everest.Content.Reprocess(); VirtualContentExt.ForceReload(); AreaData.Load(); })); }
public override void CreateModMenuSection(TextMenu menu, bool inGame, EventInstance snapshot) { base.CreateModMenuSection(menu, inGame, snapshot); menu.Add(new TextMenu.Button(Dialog.Clean("modoptions_coremodule_recrawl")).Pressed(() => { Everest.Content.Recrawl(); Everest.Content.Reprocess(); VirtualContentExt.ForceReload(); AreaData.Load(); })); }
public override void CreateModMenuSection(TextMenu menu, bool inGame, EventInstance snapshot) { if (!inGame) { if (Everest.Updater.HasUpdate) { menu.Add(new TextMenu.Button(Dialog.Clean("modoptions_coremodule_update").Replace("((version))", Everest.Updater.Newest.Version.ToString())).Pressed(() => { Everest.Updater.Update(OuiModOptions.Instance.Overworld.Goto <OuiLoggedProgress>()); })); } // Allow downgrading travis / dev builds. if (Celeste.PlayMode == Celeste.PlayModes.Debug || Everest.VersionSuffix.StartsWith("travis-") || Everest.VersionSuffix == "dev") { menu.Add(new TextMenu.Button(Dialog.Clean("modoptions_coremodule_versionlist")).Pressed(() => { OuiModOptions.Instance.Overworld.Goto <OuiVersionList>(); })); } } base.CreateModMenuSection(menu, inGame, snapshot); // Get all Input GUI prefixes and add a slider for switching between them. List <string> inputGuiPrefixes = new List <string>(); inputGuiPrefixes.Add(""); // Auto foreach (KeyValuePair <string, MTexture> kvp in GFX.Gui.GetTextures()) { string path = kvp.Key; if (!path.StartsWith("controls/")) { continue; } path = path.Substring(9); int indexOfSlash = path.IndexOf('/'); if (indexOfSlash == -1) { continue; } path = path.Substring(0, indexOfSlash); if (!inputGuiPrefixes.Contains(path)) { inputGuiPrefixes.Add(path); } } menu.Add( new TextMenu.Slider(Dialog.Clean("modoptions_coremodule_inputgui"), i => { string inputGuiPrefix = inputGuiPrefixes[i]; string fullName = $"modoptions_coremodule_inputgui_{inputGuiPrefix.ToLowerInvariant()}"; return(fullName.DialogCleanOrNull() ?? inputGuiPrefix.ToUpperInvariant()); }, 0, inputGuiPrefixes.Count - 1, Math.Max(0, inputGuiPrefixes.IndexOf(Settings.InputGui))) .Change(i => { Settings.InputGui = inputGuiPrefixes[i]; Input.OverrideInputPrefix = inputGuiPrefixes[i]; }) ); if (Celeste.PlayMode == Celeste.PlayModes.Debug) { menu.Add(new TextMenu.Button(Dialog.Clean("modoptions_coremodule_recrawl")).Pressed(() => { Everest.Content.Recrawl(); Everest.Content.Reprocess(); VirtualContentExt.ForceReload(); AreaData.Load(); })); } }