예제 #1
0
 public BepinGTFOSettingFloat(string title, eSettingInputType inputType, eCellSettingID settingID, ConfigEntry <float> entry, float defaultValue, float minValue, float maxValue) : base(title, inputType, settingID)
 {
     this.entry        = entry;
     this.defaultValue = defaultValue;
     this.minValue     = minValue;
     this.maxValue     = maxValue;
 }
예제 #2
0
 public static void ConfigChanged <T>(eCellSettingID id, T value)
 {
     if (configBindings.TryGetValue(id, out ConfigEntryBase cfgBase))
     {
         ConfigEntry <T> cfgEntry = (ConfigEntry <T>)cfgBase;
         cfgEntry.Value = value;
     }
 }
예제 #3
0
 public static string[] TryGetStringDropdownValues(eCellSettingID settingID)
 {
     foreach (BepinGTFOSettingBase setting in VRSettings)
     {
         if (setting.settingID == settingID && setting is BepinGTFOSettingString stringSetting)
         {
             return(stringSetting.possibleValues);
         }
     }
     return(null);
 }
예제 #4
0
        private static void Postfix(CM_SettingsStringArrayDropdownButton __instance, eCellSettingID id)
        {
            var stringValues = VRConfig.TryGetStringDropdownValues(id);

            if (stringValues != null)
            {
                __instance.m_values = stringValues;

                __instance.UpdateValueWithSelected();
            }
        }
예제 #5
0
 public BepinGTFOSettingBool(string title, eSettingInputType inputType, eCellSettingID settingID, ConfigEntry <bool> entry, bool defaultValue) : base(title, inputType, settingID)
 {
     this.entry        = entry;
     this.defaultValue = defaultValue;
 }
예제 #6
0
 public BepinGTFOSettingString(string title, eSettingInputType inputType, eCellSettingID settingID, ConfigEntry <string> entry, string defaultValue, string[] possibleValues) : base(title, inputType, settingID)
 {
     this.entry          = entry;
     this.defaultValue   = defaultValue;
     this.possibleValues = possibleValues;
 }
예제 #7
0
 public BepinGTFOSettingHeader(string title, eSettingInputType inputType, eCellSettingID settingID) : base(title, inputType, settingID)
 {
 }
예제 #8
0
 protected BepinGTFOSettingBase(string title, eSettingInputType inputType, eCellSettingID settingID)
 {
     this.title     = title;
     this.inputType = inputType;
     this.settingID = settingID;
 }
예제 #9
0
 private static void Postfix(CM_PageSettings __instance, eCellSettingID setting, int value)
 {
     VRConfig.ConfigChanged(setting, value);
 }
예제 #10
0
 private static void Postfix(CM_PageSettings __instance, eCellSettingID setting)
 {
     VRConfig.ConfigChanged(setting, __instance.GetToggleValue(setting));
 }