public static void AddGeneralTab_Postfix(uGUI_OptionsPanel __instance)
        {
            __instance.AddHeading(MainPatcher.tabIndex, "Additional VR Options");
            __instance.AddToggleOption(MainPatcher.tabIndex, "Enable VR Animations", GameOptions.enableVrAnimations, delegate(bool v)
            {
                GameOptions.enableVrAnimations = v;
                if (Player.main != null)
                {
                    Player.main.playerAnimator.SetBool("vr_active", !v);
                }
            });
            __instance.AddToggleOption(MainPatcher.tabIndex, "Look Down for HUD", MainPatcher.lookDownHUD, delegate(bool v)
            {
                MainPatcher.lookDownHUD = v;
                if (!v && MainPatcher.quickSlots != null && MainPatcher.barsPanel != null)
                {
                    MainPatcher.quickSlots.transform.localScale = Vector3.one;
                    MainPatcher.barsPanel.transform.localScale  = Vector3.one;
                }
            });
#if SN1
            __instance.AddSliderOption(MainPatcher.tabIndex, "Walk Speed(Default: 60%)", VROptions.groundMoveScale * 100f, 50f, 100f, 60f, delegate(float v)
            {
                VROptions.groundMoveScale = v / 100f;
            });
#elif BZ
            __instance.AddSliderOption(MainPatcher.tabIndex, "Walk Speed(Default: 60%)", VROptions.groundMoveScale * 100f, 50f, 100f, 60f, 1f, delegate(float v)
            {
                VROptions.groundMoveScale = v / 100f;
            }, SliderLabelMode.Int, "0");
#endif
        }
            internal static void Postfix(uGUI_OptionsPanel __instance)
            {
                int modsTab = __instance.AddTab("Mods");

                __instance.AddHeading(modsTab, "QModManager");

                bool enableDebugLogs = PlayerPrefsExtra.GetBool("QModManager_EnableDebugLogs", false);

                __instance.AddToggleOption(modsTab, "Enable debug logs", enableDebugLogs,
                                           new UnityAction <bool>(toggleVal => PlayerPrefsExtra.SetBool("QModManager_EnableDebugLogs", toggleVal)));

                bool updateCheck = PlayerPrefsExtra.GetBool("QModManager_EnableUpdateCheck", true);

                __instance.AddToggleOption(modsTab, "Check for updates", updateCheck,
                                           new UnityAction <bool>(toggleVal => PlayerPrefsExtra.SetBool("QModManager_EnableUpdateCheck", toggleVal)));

                bool enableDebugger = PlayerPrefsExtra.GetBool("QModManager_PrefabDebugger_EnableExperimental", false);

                __instance.AddToggleOption(modsTab, "Enable prefab debugger (experimental)", enableDebugger,
                                           new UnityAction <bool>(toggleVal => PlayerPrefsExtra.SetBool("QModManager_PrefabDebugger_EnableExperimental", toggleVal)));

                /*bool enableDebugger = PlayerPrefsExtra.GetBool("QModManager_PrefabDebugger_Enable", true);
                 * __instance.AddToggleOption(modsTab, "Enable prefab debugger", enableDebugger,
                 *  new UnityAction<bool>(toggleVal => PlayerPrefsExtra.SetBool("QModManager_PrefabDebugger_Enable", toggleVal)));*/
            }
 public static void AddGeneralTab_Postfix(uGUI_OptionsPanel __instance)
 {
     __instance.AddHeading(_tabIndex, "Snap Turning");//add new heading under the General Tab
     __instance.AddToggleOption(_tabIndex, "Enable Snap Turning", SnapTurningOptions.EnableSnapTurning, (bool v) => SnapTurningOptions.EnableSnapTurning = v);
     __instance.AddChoiceOption(_tabIndex, "Snap Angle", SnapTurningOptions.SnapAngleChoices, SnapTurningOptions.SnapAngleChoiceIndex, (int index) => SnapTurningOptions.SnapAngleChoiceIndex = index);
     __instance.AddBindingOption(_tabIndex, "Keyboard Turn Left", GameInput.Device.Keyboard, GameInput.Button.LookLeft);
     __instance.AddBindingOption(_tabIndex, "Keyboard Turn Right", GameInput.Device.Keyboard, GameInput.Button.LookRight);
     __instance.AddToggleOption(_tabIndex, "Disable Mouse Look", SnapTurningOptions.DisableMouseLook, (bool v) => SnapTurningOptions.DisableMouseLook = v);
 }
Exemple #4
0
 //TODO: Create a new tab instead of using general for all the additional VR options and if possible move existing VR to the same tab
 static void Postfix(uGUI_OptionsPanel __instance)
 {
     __instance.AddHeading(generalTabIndex, "Additional VR Options");//add new heading under the General Tab
     __instance.AddToggleOption(generalTabIndex, "Enable VR Animations", GameOptions.enableVrAnimations, delegate(bool v)
     {
         GameOptions.enableVrAnimations = v;
         //playerAnimator vr_active is normally set in the Start function of Player so we need to update it if option changed during gameplay
         if (Player.main != null)
         {
             Player.main.playerAnimator.SetBool("vr_active", !v);
         }
     });
     __instance.AddSliderOption(generalTabIndex, "Walk Speed(Default: 60%)", VROptions.groundMoveScale * 100, 50, 100, 60, delegate(float v)
     {
         VROptions.groundMoveScale = v / 100f;
     });
     __instance.AddSliderOption(generalTabIndex, "Subtitle Height", subtitleYPos, 20, 75, 50, delegate(float v)
     {
         subtitleYPos = v;
         UIElementsFixes.SetSubtitleHeight(subtitleYPos);
     });
     __instance.AddSliderOption(generalTabIndex, "Subtitle Scale", subtitleScale * 100, 50, 150, 100, delegate(float v)
     {
         subtitleScale = v / 100;
         UIElementsFixes.SetSubtitleScale(subtitleScale);
     });
     __instance.AddSliderOption(generalTabIndex, "PDA Distance", PDA_Distance * 100f, 25, 40, 40, delegate(float v)
     {
         PDA_Distance = v / 100f;
     });
     __instance.AddHeading(generalTabIndex, "VR HUD Options");//add new heading under the General Tab
     __instance.AddToggleOption(generalTabIndex, "Dynamic HUD", DynamicHUD, delegate(bool v)
     {
         DynamicHUD = v;
         if (!DynamicHUD)
         {
             VRHUD.UpdateHUDOpacity(HUDAlpha);
         }
     });
     __instance.AddSliderOption(generalTabIndex, "HUD Opacity", HUDAlpha * 100f, 20, 100, 100, delegate(float v)
     {
         HUDAlpha = v / 100f;
         VRHUD.UpdateHUDOpacity(HUDAlpha);
     });
     __instance.AddSliderOption(generalTabIndex, "HUD Distance", HUD_Distance / 0.5f, 1, 4, 2, delegate(float v)
     {
         HUD_Distance = v * 0.5f;
         VRHUD.UpdateHUDDistance(HUD_Distance);
     });
     __instance.AddSliderOption(generalTabIndex, "HUD Scale", HUD_Scale / 0.5f, 1, 4, 2, delegate(float v)
     {
         HUD_Scale = v * 0.5f;
         VRHUD.UpdateHUDScale(HUD_Scale);
     });
 }
Exemple #5
0
            internal static void Postfix(uGUI_OptionsPanel __instance)
            {
                ModsTab = __instance.AddTab("Mods");
                __instance.AddHeading(ModsTab, "QModManager");

                bool enableDebugLogs = PlayerPrefsExtra.GetBool("QModManager_EnableDebugLogs", false);

                __instance.AddToggleOption(ModsTab, "Enable debug logs", enableDebugLogs,
                                           new UnityAction <bool>(toggleVal => PlayerPrefsExtra.SetBool("QModManager_EnableDebugLogs", toggleVal)));

                bool updateCheck = PlayerPrefsExtra.GetBool("QModManager_EnableUpdateCheck", true);

                __instance.AddToggleOption(ModsTab, "Check for updates", updateCheck,
                                           new UnityAction <bool>(toggleVal => PlayerPrefsExtra.SetBool("QModManager_EnableUpdateCheck", toggleVal)));
            }
Exemple #6
0
 public static void AddJukeBoxTab(uGUI_OptionsPanel oPanel)
 {
     if (oPanel != null)
     {
         int tabIndex = oPanel.AddTab("Jukebox");
         oPanel.AddHeading(tabIndex, "Jukebox Colors");
         oPanel.AddToggleOption(tabIndex, "Toggle Jukebox Colors", JukeboxConfig.JBColor, (bool v) => JukeboxConfig.JBColor = ToggleColorChange(v), "Allows you to change the colors of the jukebox lights");
         MainStoppedColor = oPanel.AddColorOption(tabIndex, "Color 1", JukeboxConfig.FlashColor0, (Color Color0) => JukeboxConfig.FlashColor0 = Color0);
         MainColor        = oPanel.AddColorOption(tabIndex, "Color 2", JukeboxConfig.FlashColor2, (Color Color2) => JukeboxConfig.FlashColor2 = Color2);
         BeatColor        = oPanel.AddColorOption(tabIndex, "Color 3", JukeboxConfig.FlashColor1, (Color Color1) => JukeboxConfig.FlashColor1 = Color1);
         oPanel.AddHeading(tabIndex, "Jukebox Options");
         oPanel.AddToggleOption(tabIndex, "Toggle Party Mode", JukeboxConfig.PartyMode, (bool partyMode) => JukeboxConfig.PartyMode = partyMode, "Turns the rooms lights off the jukebox is in while playing");
         ToggleColorChange(JukeboxConfig.JBColor);
     }
 }
        public static void Postfix(uGUI_OptionsPanel __instance)
        {
            nitroxSettingsManager ??= Resolve <NitroxSettingsManager>(true);
            int tabIndex = __instance.AddTab("Nitrox");

            foreach (KeyValuePair <string, List <NitroxSettingsManager.Setting> > settingEntries in nitroxSettingsManager.NitroxSettings)
            {
                __instance.AddHeading(tabIndex, settingEntries.Key);
                foreach (NitroxSettingsManager.Setting setting in settingEntries.Value)
                {
                    switch (setting.SettingType)
                    {
                    case NitroxSettingsManager.SettingType.TOGGLE:
                        __instance.AddToggleOption(tabIndex, setting.Label, setting.GetValue <bool>(), (UnityAction <bool>)setting.Callback);
                        break;

                    case NitroxSettingsManager.SettingType.SLIDER:
                        __instance.AddSliderOption(tabIndex, setting.Label, setting.GetValue <float>(), setting.SliderMinValue, setting.SliderMaxValue, setting.SliderDefaultValue, (UnityAction <float>)setting.Callback);
                        break;

                    case NitroxSettingsManager.SettingType.LIST:
                        __instance.AddChoiceOption(tabIndex, setting.Label, setting.ListItems, setting.GetValue <int>(), (UnityAction <int>)setting.Callback);
                        break;
                    }
                }
            }
        }
Exemple #8
0
            internal static void Postfix(uGUI_OptionsPanel __instance)
            {
                ModsTab = __instance.AddTab("Mods");
                __instance.AddHeading(ModsTab, "QModManager");

                __instance.AddToggleOption(ModsTab, "Check for updates", Config.CheckForUpdates, new UnityAction <bool>(value => Config.CheckForUpdates = value));

                __instance.AddToggleOption(ModsTab, "Enable console", Config.EnableConsole, new UnityAction <bool>(value =>
                {
                    Config.EnableConsole      = value;
                    DevConsole.disableConsole = !value;
                    UnityEngine.PlayerPrefs.SetInt("UWE.DisableConsole", value ? 0 : 1);
                }));

                __instance.AddToggleOption(ModsTab, "Enable debug logs", Config.EnableDebugLogs, new UnityAction <bool>(value => Config.EnableDebugLogs = value));

                __instance.AddToggleOption(ModsTab, "Enable developer mode", Config.EnableDevMode, new UnityAction <bool>(value => Config.EnableDevMode = value));
            }
Exemple #9
0
            internal static void Postfix(uGUI_OptionsPanel __instance)
            {
                ModsTab = __instance.AddTab("Mods");
                __instance.AddHeading(ModsTab, "QModManager");

                __instance.AddToggleOption(ModsTab, "Check for updates", Config.CheckForUpdates, new UnityAction <bool>(value => Config.CheckForUpdates = value));

                __instance.AddToggleOption(ModsTab, "Enable console", Config.EnableConsole, new UnityAction <bool>(value =>
                {
                    Config.EnableConsole = value;
#if SUBNAUTICA_STABLE
                    DevConsole.disableConsole = !value;
                    UnityEngine.PlayerPrefs.SetInt("UWE.DisableConsole", value ? 0 : 1);
#elif BELOWZERO || SUBNAUTICA_EXP
                    PlatformUtils.SetDevToolsEnabled(value);
#endif
                }));

                __instance.AddToggleOption(ModsTab, "Enable debug logs", Config.EnableDebugLogs, new UnityAction <bool>(value => Config.EnableDebugLogs = value));

                __instance.AddToggleOption(ModsTab, "Enable developer mode", Config.EnableDevMode, new UnityAction <bool>(value => Config.EnableDevMode = value));
            }
 static void Postfix(uGUI_OptionsPanel __instance)
 {
     __instance.AddHeading(generalTabIndex, "Misc VR Options");
     __instance.AddToggleOption(generalTabIndex, "Disable Y-Axis Input", VROptions.disableInputPitch, (bool v) => VROptions.disableInputPitch = v);
     __instance.AddSliderOption(generalTabIndex, "Ground Speed Scale", VROptions.groundMoveScale, 0.6f, (float v) => {
         if (v <= 0f)
         {
             // Never allow 0 scale speed (immobile)
             v = .05f;
         }
         VROptions.groundMoveScale = v;
     }
                                );
 }
Exemple #11
0
        private void AddTab()
        {
            m_tabIndex = -1;

            Transform tab;
            Text      tabText;

            for (int i = 0; i < m_optionsPanel.tabsContainer.childCount; ++i) //search for "Mods" tab
            {
                tab     = m_optionsPanel.tabsContainer.GetChild(i);
                tabText = tab.GetComponentInChildren <Text>(true);
                if (tabText != null && tabText.text == "Mods")
                {
                    m_tabIndex = i;
                }
            }

            if (m_tabIndex == -1) //no existing mods tab found. add new
            {
                m_tabIndex = m_optionsPanel.AddTab("Mods");
            }

            //add options
            m_optionsPanel.AddHeading(m_tabIndex, "Cyclops Strafe");

            //m_optionsPanel.AddHeading(m_tabIndex, "Keyboard");
            m_useModifierToggle        = m_optionsPanel.AddToggleOption(m_tabIndex, "Use modifier key", m_config.UseModifier, OnStrafeUseModifierToggle);
            m_useModifierBindingOption = AddBinding(m_tabIndex, "Modifier", GetKeyCodeAsInputName(m_config.StrafeModifierKey), GameInput.Device.Keyboard, OnModifierBindingChange);
            AddBinding(m_tabIndex, "Strafe left key", GetKeyCodeAsInputName(m_config.StrafeLeftKey), GameInput.Device.Keyboard, OnStrafeLeftBindingChange);
            AddBinding(m_tabIndex, "Strafe right key", GetKeyCodeAsInputName(m_config.StrafeRightKey), GameInput.Device.Keyboard, OnStrafeRightBindingChange);

            //m_optionsPanel.AddHeading(m_tabIndex, "Controller");

            //AddBinding(m_tabIndex, "Strafe left button", GetKeyCodeAsInputName(m_config.StrafeLeftButton), GameInput.Device.Controller, OnStrafeLeftButtonBindingChange);
            //AddBinding(m_tabIndex, "Strafe right button", GetKeyCodeAsInputName(m_config.StrafeRightButton), GameInput.Device.Controller, OnStrafeRightButtonBindingChange);

            //no speed editing for now
            //m_optionsPanel.AddSliderOption(m_tabIndex, "Strafe speed", m_config.StrafeSpeed, 0.01f, 2f, m_config.StrafeSpeed, OnStrafeSpeedValueChange);
            m_currentModifierBinding = System.Enum.GetName(typeof(KeyCode), m_config.StrafeModifierKey);
            m_modifierBindingOption  = m_useModifierBindingOption.GetComponentInChildren <uGUI_Binding>(true);

            if (!m_config.UseModifier)
            {
                m_useModifierBindingOption.SetActive(false);
            }
        }
Exemple #12
0
        internal static void AddTabs_Postfix(uGUI_OptionsPanel __instance)
        {
            uGUI_OptionsPanel optionsPanel = __instance;

            // Start the modsTab index at a value of -1
            int modsTab = -1;

            // Loop through all of the tabs
            for (int i = 0; i < optionsPanel.tabsContainer.childCount; i++)
            {
                // Check if they are named "Mods"
                var text = optionsPanel.tabsContainer.GetChild(i).GetComponentInChildren <Text>(true);

                if (text != null && text.text == "Mods")
                {
                    // Set the tab index to the found one and break
                    modsTab = i;
                    break;
                }
            }

            // If no tab was found, create one
            if (modsTab == -1)
            {
                modsTab = optionsPanel.AddTab("Mods");
            }

            // Maybe this could be split into its own file to handle smlhelper options, or maybe it could be removed alltogether
            optionsPanel.AddHeading(modsTab, "SMLHelper");
            optionsPanel.AddToggleOption(modsTab, "Enable debug logs", V2.Logger.EnableDebugging, V2.Logger.SetDebugging);
            optionsPanel.AddChoiceOption(modsTab, "Extra item info", new string[]
            {
                "Mod name (default)",
                "Mod name and item ID",
                "Nothing"
            }, (int)TooltipPatcher.ExtraItemInfoOption, (i) => TooltipPatcher.SetExtraItemInfo((TooltipPatcher.ExtraItemInfo)i));

            // adding all other options here
            modOptions.Values.ForEach(options => options.AddOptionsToPanel(optionsPanel, modsTab));
        }
Exemple #13
0
        internal static void AddTabs_Postfix(uGUI_OptionsPanel __instance)
        {
            uGUI_OptionsPanel optionsPanel = __instance;

            // Start the modsTab index at a value of -1
            var modsTab = -1;

            // Loop through all of the tabs
            for (int i = 0; i < optionsPanel.tabsContainer.childCount; i++)
            {
                // Check if they are named "Mods"
                var text = optionsPanel.tabsContainer.GetChild(i).GetComponentInChildren <Text>(true);
                if (text != null && text.text == "Mods")
                {
                    // Set the tab index to the found one and break
                    modsTab = i;
                    break;
                }
            }
            // If no tab was found, create one
            if (modsTab == -1)
            {
                modsTab = optionsPanel.AddTab("Mods");
            }

            // Maybe this could be split into its own file to handle smlhelper options, or maybe it could be removed alltogether
            optionsPanel.AddHeading(modsTab, "SMLHelper");
            optionsPanel.AddToggleOption(modsTab, "Enable debug logs", V2.Logger.EnableDebugging, V2.Logger.SetDebugging);

            foreach (ModOptions modOption in modOptions.Values)
            {
                optionsPanel.AddHeading(modsTab, modOption.Name);

                foreach (ModOption option in modOption.Options)
                {
                    switch (option.Type)
                    {
                    case ModOptionType.Slider:
                        var slider = (ModSliderOption)option;

                        optionsPanel.AddSliderOption(modsTab, slider.Label, slider.Value, slider.MinValue, slider.MaxValue, slider.Value,
                                                     new UnityAction <float>((float sliderVal) =>
                                                                             modOption.OnSliderChange(slider.Id, sliderVal)));
                        break;

                    case ModOptionType.Toggle:
                        var toggle = (ModToggleOption)option;

                        optionsPanel.AddToggleOption(modsTab, toggle.Label, toggle.Value,
                                                     new UnityAction <bool>((bool toggleVal) =>
                                                                            modOption.OnToggleChange(toggle.Id, toggleVal)));
                        break;

                    case ModOptionType.Choice:
                        var choice = (ModChoiceOption)option;

                        optionsPanel.AddChoiceOption(modsTab, choice.Label, choice.Options, choice.Index,
                                                     new UnityAction <int>((int index) =>
                                                                           modOption.OnChoiceChange(choice.Id, index, choice.Options[index])));
                        break;

                    case ModOptionType.Keybind:
                        var keybind = (ModKeybindOption)option;

                        ModKeybindOption.AddBindingOptionWithCallback(optionsPanel, modsTab, keybind.Label, keybind.Key, keybind.Device,
                                                                      new UnityAction <KeyCode>((KeyCode key) =>
                                                                                                modOption.OnKeybindChange(keybind.Id, key)));
                        break;

                    default:
                        V2.Logger.Log($"Invalid ModOptionType detected for option: {option.Id} ({option.Type.ToString()})", LogLevel.Error);
                        break;
                    }
                }
            }
        }
Exemple #14
0
 public static void AddGeneralTab_Postfix(uGUI_OptionsPanel __instance)
 {
     __instance.AddHeading(tabIndex, "Snap Turning");//add new heading under the General Tab
     __instance.AddToggleOption(tabIndex, "Enable Snap Turning", SnapTurningOptions.EnableSnapTurning, (bool v) => SnapTurningOptions.EnableSnapTurning = v);
     __instance.AddChoiceOption(tabIndex, "Snap Angle", SnapTurningOptions.SnapAngleChoices, SnapTurningOptions.SnapAngleChoiceIndex, (int index) => SnapTurningOptions.SnapAngleChoiceIndex = index);
 }
Exemple #15
0
            public static void Postfix(uGUI_OptionsPanel __instance)
            {
                if (nullableModsTabIndex.HasValue)
                {
                    var modsTabIndex = nullableModsTabIndex.Value;

                    __instance.AddHeading(modsTabIndex, $"Terraforming");

#if BelowZero
                    __instance.AddToggleOption(modsTabIndex, $"Rebuilding messages", Config.Instance.rebuildMessages,
                                               new UnityAction <bool>(value => Config.Instance.rebuildMessages = value),
                                               $"Shows terrain rebuilding message while terrain rebuilding is in progress. Enabled by default."
                                               );

                    __instance.AddToggleOption(modsTabIndex, $"Habitant modules burying", Config.Instance.habitantModulesPartialBurying,
                                               new UnityAction <bool>(value => Config.Instance.habitantModulesPartialBurying = value),
                                               $"Allows habitat burying into terrain and adjusts overlapping terrain around them. Enabled by default."
                                               );

                    __instance.AddSliderOption(modsTabIndex, $"Space between terrain and module", Config.Instance.spaceBetweenTerrainHabitantModule,
                                               0.0f, 10.0f,
                                               DefaultConfig.spaceBetweenTerrainHabitantModule,
                                               0.5f,
                                               new UnityAction <float>(value => Config.Instance.spaceBetweenTerrainHabitantModule = value),
                                               SliderLabelMode.Float,
                                               "0.0"
                                               );

                    __instance.AddToggleOption(modsTabIndex, $"Propulsion cannon terrain impact", Config.Instance.terrainImpactWithPropulsionCannon,
                                               new UnityAction <bool>(value => Config.Instance.terrainImpactWithPropulsionCannon = value),
                                               $"Causes the repulsion cannon to remove small portion of terrain after \"shooting\" pulse to spot. Enabled by default."
                                               );

                    __instance.AddToggleOption(modsTabIndex, $"Destroy obstacles on construction", Config.Instance.destroyLargerObstaclesOnConstruction,
                                               new UnityAction <bool>(value => Config.Instance.destroyLargerObstaclesOnConstruction = value),
                                               $"Disables restrictions of overlapping larger objects with placable habitat module. Destroys them when construction of module finishes. Enabled by default."
                                               );
#else
                    __instance.AddToggleOption(modsTabIndex, $"Rebuilding messages", Config.Instance.rebuildMessages,
                                               new UnityAction <bool>(value => Config.Instance.rebuildMessages = value)
                                               );

                    __instance.AddToggleOption(modsTabIndex, $"Habitant modules burying", Config.Instance.habitantModulesPartialBurying,
                                               new UnityAction <bool>(value => Config.Instance.habitantModulesPartialBurying = value)
                                               );

                    __instance.AddSliderOption(modsTabIndex, $"Terrain vs module space", Config.Instance.spaceBetweenTerrainHabitantModule,
                                               0.0f, 10.0f,
                                               DefaultConfig.spaceBetweenTerrainHabitantModule,
                                               new UnityAction <float>(value => Config.Instance.spaceBetweenTerrainHabitantModule = value)
                                               );

                    __instance.AddToggleOption(modsTabIndex, $"Repulsion terrain impact", Config.Instance.terrainImpactWithPropulsionCannon,
                                               new UnityAction <bool>(value => Config.Instance.terrainImpactWithPropulsionCannon = value)
                                               );

                    __instance.AddToggleOption(modsTabIndex, $"Destroy obstacles", Config.Instance.destroyLargerObstaclesOnConstruction,
                                               new UnityAction <bool>(value => Config.Instance.destroyLargerObstaclesOnConstruction = value)
                                               );
#endif
                }
            }
        // Class: uGUI_OptionsPanel
        public static void AddGeneralTab_Postfix(uGUI_OptionsPanel __instance)
        {
            __instance.AddHeading(tabIndex, "Additional VR Options");//add new heading under the General Tab
            __instance.AddToggleOption(tabIndex, "Enable VR Animations", GameOptions.enableVrAnimations, delegate(bool v)
            {
                GameOptions.enableVrAnimations = v;
                //playerAnimator vr_active is normally set in the Start function of Player so we need to update it if option changed during gameplay
                if (Player.main != null)
                {
                    Player.main.playerAnimator.SetBool("vr_active", !v);
                }
            });
            __instance.AddToggleOption(tabIndex, "Look Down for HUD", lookDownHUD, delegate(bool v)
            {
                lookDownHUD = v;
                //immediated reenable the HUD if option toggled off
                if (!v && quickSlots != null && barsPanel != null)
                {
                    MainPatcher.ConfigureHUD(1.0f);
                }
            });
            __instance.AddSliderOption(tabIndex, "Walk Speed (Default: 60%)", VROptions.groundMoveScale * 100, 50, 100, 60, delegate(float v)
            {
                VROptions.groundMoveScale = v / 100f;
            });

            /* Weird stuff was happening if the PDA was opened and when entering the Seamoth when pitch was changed with the mouse or controller
             * __instance.AddToggleOption(tabIndex, "Enable Pitch Control", !VROptions.disableInputPitch, delegate (bool v)
             * {
             *  VROptions.disableInputPitch = !v;
             *  //reset pitch to zero if pitch control is disabled.
             *  if (VROptions.disableInputPitch)
             *  {
             *      Player.main.GetComponentInChildren<MainCameraControl>().ResetCamera();
             *  }
             * });*/
            __instance.AddHeading(MainPatcher.tabIndex, "VR HUD");
            __instance.AddSliderOption(MainPatcher.tabIndex, "Subtitles Vertical Offset", MainPatcher.subtitlesVerticalOffset, -1000f, 1000f, 800f, delegate(float v)
            {
                MainPatcher.subtitlesVerticalOffset = v;
            });
            __instance.AddSliderOption(MainPatcher.tabIndex, "Subtitles Scale", MainPatcher.subtitlesScale * 100f, 10f, 200f, 100f, delegate(float v)
            {
                MainPatcher.subtitlesScale = v / 100f;
            });
            __instance.AddSliderOption(MainPatcher.tabIndex, "PDA Scale", MainPatcher.pdaScale * 100f, 10f, 200f, 128f, delegate(float v)
            {
                MainPatcher.pdaScale = v / 100f;
            });
            __instance.AddSliderOption(MainPatcher.tabIndex, "Menu Vertical Offset", MainPatcher.mainMenuVerticalOffset, -1000f, 1000f, 800f, delegate(float v)
            {
                MainPatcher.mainMenuVerticalOffset = v;
            });

            foreach (KeyValuePair <string, HUDElementConfig> ElementConfig in HUDElements)
            {
                string LabelPrefix = ElementConfig.Key + " ";
                __instance.AddSliderOption(MainPatcher.tabIndex, LabelPrefix + "Horizontal Offset", ElementConfig.Value.Offset.x, -999f, 999f, 0f, delegate(float v)
                {
                    ElementConfig.Value.Offset.x = v;
                });
                __instance.AddSliderOption(MainPatcher.tabIndex, LabelPrefix + "Vertical Offset", ElementConfig.Value.Offset.y, -999f, 999f, 0f, delegate(float v)
                {
                    ElementConfig.Value.Offset.y = v;
                });
                __instance.AddSliderOption(MainPatcher.tabIndex, LabelPrefix + "Scale", ElementConfig.Value.Scale * 100f, 5f, 200f, 1f, delegate(float v)
                {
                    ElementConfig.Value.Scale = v / 100f;
                });
            }
        }