mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
fix errors
This commit is contained in:
1 parent
475551917b
commit
666774d29d
4 files changed
+12
-4
No files matched your search
@@ -33,7 +33,7 @@ namespace MiraAPI.GameOptions.OptionTypes
|
||||
// SetUpFromData method doesnt work correctly so we must set the values manually
|
||||
stringOption.Title = StringName;
|
||||
stringOption.Values = ((StringGameSetting)Data).Values;
|
||||
stringOption.Value = DefaultValue;
|
||||
stringOption.Value = Value;
|
||||
|
||||
OptionBehaviour = stringOption;
|
||||
|
||||
|
||||
@@ -44,7 +44,16 @@ namespace MiraAPI.GameOptions.OptionTypes
|
||||
|
||||
numberOption.SetUpFromData(Data, 20);
|
||||
numberOption.OnValueChanged = (Il2CppSystem.Action<OptionBehaviour>)ValueChanged;
|
||||
|
||||
numberOption.Title = StringName;
|
||||
numberOption.Value = Value;
|
||||
numberOption.Increment = Increment;
|
||||
numberOption.ValidRange = new FloatRange(Min, Max);
|
||||
numberOption.FormatString = "0";
|
||||
numberOption.ZeroIsInfinity = ZeroInfinity;
|
||||
numberOption.SuffixType = SuffixType;
|
||||
numberOption.floatOptionName = FloatOptionNames.Invalid;
|
||||
|
||||
|
||||
OptionBehaviour = numberOption;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace MiraAPI.GameOptions.OptionTypes
|
||||
// SetUpFromData method doesnt work correctly so we must set the values manually
|
||||
stringOption.Title = StringName;
|
||||
stringOption.Values = ((StringGameSetting)Data).Values;
|
||||
stringOption.Value = DefaultValue;
|
||||
stringOption.Value = Value;
|
||||
|
||||
OptionBehaviour = stringOption;
|
||||
|
||||
|
||||
@@ -9,8 +9,6 @@ namespace MiraAPI.GameOptions.OptionTypes
|
||||
{
|
||||
public ModdedToggleOption(string title, bool defaultValue, System.Type roleType) : base(title, defaultValue, roleType)
|
||||
{
|
||||
Value = defaultValue;
|
||||
|
||||
Data = ScriptableObject.CreateInstance<CheckboxGameSetting>();
|
||||
|
||||
var data = (CheckboxGameSetting)Data;
|
||||
@@ -24,6 +22,7 @@ namespace MiraAPI.GameOptions.OptionTypes
|
||||
|
||||
toggleOption.SetUpFromData(Data, 20);
|
||||
|
||||
toggleOption.Title = StringName;
|
||||
toggleOption.TitleText.text = Title;
|
||||
toggleOption.CheckMark.enabled = Value;
|
||||
toggleOption.OnValueChanged = (Il2CppSystem.Action<OptionBehaviour>)ValueChanged;
|
||||
|
||||
Reference in new issue
Block a user