コード例 #1
0
            private static bool Prefix(Panel_OptionsMenu __instance)
            {
                ModSettingsGUI gui = GetModSettingsGUI(__instance);

                if (!gui.gameObject.activeInHierarchy)
                {
                    return(true);
                }

                GameAudioManager.PlayGuiConfirm();
                gui.CallOnConfirm();

                return(false);
            }
コード例 #2
0
        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);
                }
            }
        }
コード例 #3
0
            private static void ShowModSettings(Panel_OptionsMenu __instance)
            {
                ModSettingsGUI settings = GetModSettingsGUI(__instance);

                settings.Enable(__instance);
            }
コード例 #4
0
 internal MenuGroup(string modName, ModSettingsGUI modSettings)
 {
     this.modName     = modName;
     this.modSettings = modSettings;
 }
コード例 #5
0
 private ModSettingsGUIBuilder(string modName, ModSettingsGUI settingsGUI, ModTab modTab) : base(modTab.uiGrid, modTab.menuItems)
 {
     this.settingsGUI = settingsGUI;
     menuGroup        = new MenuGroup(modName, settingsGUI);
     tabSettings      = modTab.modSettings;
 }
コード例 #6
0
 internal ModSettingsGUIBuilder(string modName, ModSettingsGUI settingsGUI) : this(modName, settingsGUI, settingsGUI.CreateModTab(modName))
 {
 }