private static bool Prefix(Panel_OptionsMenu __instance) { ModSettingsGUI gui = GetModSettingsGUI(__instance); if (!gui.gameObject.activeInHierarchy) { return(true); } GameAudioManager.PlayGuiConfirm(); gui.CallOnConfirm(); return(false); }
internal static void BuildGUI() { GameObject modSettingsTab = ModSettingsGUIBuilder.CreateModSettingsTab(); modSettingsGUI = modSettingsTab.AddComponent <ModSettingsGUI>(); foreach (KeyValuePair <string, List <ModSettingsBase> > entry in settingsByModName) { ModSettingsGUIBuilder guiBuilder = new ModSettingsGUIBuilder(entry.Key, modSettingsGUI); foreach (ModSettingsBase modSettings in entry.Value) { guiBuilder.AddSettings(modSettings); } } }
private static void ShowModSettings(Panel_OptionsMenu __instance) { ModSettingsGUI settings = GetModSettingsGUI(__instance); settings.Enable(__instance); }
internal MenuGroup(string modName, ModSettingsGUI modSettings) { this.modName = modName; this.modSettings = modSettings; }
private ModSettingsGUIBuilder(string modName, ModSettingsGUI settingsGUI, ModTab modTab) : base(modTab.uiGrid, modTab.menuItems) { this.settingsGUI = settingsGUI; menuGroup = new MenuGroup(modName, settingsGUI); tabSettings = modTab.modSettings; }
internal ModSettingsGUIBuilder(string modName, ModSettingsGUI settingsGUI) : this(modName, settingsGUI, settingsGUI.CreateModTab(modName)) { }