Skip to content

Commit

Permalink
rename SetCurrentValue to SetValue
Browse files Browse the repository at this point in the history
  • Loading branch information
misternebula committed Oct 10, 2024
1 parent 5d8c06f commit d1563e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/OWML.Common/Interfaces/Menus/IOWMLTextEntryElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public interface IOWMLTextEntryElement : IOWMLMenuValueOption
/// <summary>
/// Sets the underlying option value to the text, and updates the displayed text.
/// </summary>
public void SetCurrentValue(string text);
public void SetValue(string text);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void SetText(string text)
gameObject.GetComponentsInChildren<MenuOption>().First(x => x != this)._label.text = text;
}

public void SetCurrentValue(string text)
public void SetValue(string text)
{
SetText(text);
_popup.GetInputField().text = text;
Expand Down
4 changes: 2 additions & 2 deletions src/OWML.ModHelper.Menus/NewMenuSystem/Patches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ public static void ResetToDefaultSettings(SettingsMenuView __instance)
{
if (textEntry.IsNumeric)
{
textEntry.SetCurrentValue(defaultSettings.GetSettingsValue<double>(textEntry.ModSettingKey).ToString(CultureInfo.InvariantCulture));
textEntry.SetValue(defaultSettings.GetSettingsValue<double>(textEntry.ModSettingKey).ToString(CultureInfo.InvariantCulture));
}
else
{
var defaultValue = defaultSettings.GetSettingsValue<string>(textEntry.ModSettingKey);
textEntry.SetCurrentValue(defaultValue);
textEntry.SetValue(defaultValue);
}
}
}
Expand Down

0 comments on commit d1563e1

Please sign in to comment.