Exemplo n.º 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);
            }
        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);
                }
            }
        }
Exemplo n.º 3
0
            private static void ShowModSettings(Panel_OptionsMenu __instance)
            {
                ModSettingsGUI settings = GetModSettingsGUI(__instance);

                settings.Enable(__instance);
            }
Exemplo n.º 4
0
 internal MenuGroup(string modName, ModSettingsGUI modSettings)
 {
     this.modName     = modName;
     this.modSettings = modSettings;
 }
Exemplo n.º 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;
 }
Exemplo n.º 6
0
 internal ModSettingsGUIBuilder(string modName, ModSettingsGUI settingsGUI) : this(modName, settingsGUI, settingsGUI.CreateModTab(modName))
 {
 }