From d1563e13e5cf39eead6401658342e1d69c0969ce Mon Sep 17 00:00:00 2001
From: _nebula <41904486+misternebula@users.noreply.github.com>
Date: Thu, 10 Oct 2024 17:30:26 +0100
Subject: [PATCH] rename SetCurrentValue to SetValue
---
src/OWML.Common/Interfaces/Menus/IOWMLTextEntryElement.cs | 2 +-
src/OWML.ModHelper.Menus/CustomInputs/OWMLTextEntryElement.cs | 2 +-
src/OWML.ModHelper.Menus/NewMenuSystem/Patches.cs | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/OWML.Common/Interfaces/Menus/IOWMLTextEntryElement.cs b/src/OWML.Common/Interfaces/Menus/IOWMLTextEntryElement.cs
index 3bb3492be..73d6275de 100644
--- a/src/OWML.Common/Interfaces/Menus/IOWMLTextEntryElement.cs
+++ b/src/OWML.Common/Interfaces/Menus/IOWMLTextEntryElement.cs
@@ -16,6 +16,6 @@ public interface IOWMLTextEntryElement : IOWMLMenuValueOption
///
/// Sets the underlying option value to the text, and updates the displayed text.
///
- public void SetCurrentValue(string text);
+ public void SetValue(string text);
}
}
diff --git a/src/OWML.ModHelper.Menus/CustomInputs/OWMLTextEntryElement.cs b/src/OWML.ModHelper.Menus/CustomInputs/OWMLTextEntryElement.cs
index 3e2ceb6f8..058cb75c7 100644
--- a/src/OWML.ModHelper.Menus/CustomInputs/OWMLTextEntryElement.cs
+++ b/src/OWML.ModHelper.Menus/CustomInputs/OWMLTextEntryElement.cs
@@ -28,7 +28,7 @@ public void SetText(string text)
gameObject.GetComponentsInChildren().First(x => x != this)._label.text = text;
}
- public void SetCurrentValue(string text)
+ public void SetValue(string text)
{
SetText(text);
_popup.GetInputField().text = text;
diff --git a/src/OWML.ModHelper.Menus/NewMenuSystem/Patches.cs b/src/OWML.ModHelper.Menus/NewMenuSystem/Patches.cs
index d9b08560b..917f82b53 100644
--- a/src/OWML.ModHelper.Menus/NewMenuSystem/Patches.cs
+++ b/src/OWML.ModHelper.Menus/NewMenuSystem/Patches.cs
@@ -74,12 +74,12 @@ public static void ResetToDefaultSettings(SettingsMenuView __instance)
{
if (textEntry.IsNumeric)
{
- textEntry.SetCurrentValue(defaultSettings.GetSettingsValue(textEntry.ModSettingKey).ToString(CultureInfo.InvariantCulture));
+ textEntry.SetValue(defaultSettings.GetSettingsValue(textEntry.ModSettingKey).ToString(CultureInfo.InvariantCulture));
}
else
{
var defaultValue = defaultSettings.GetSettingsValue(textEntry.ModSettingKey);
- textEntry.SetCurrentValue(defaultValue);
+ textEntry.SetValue(defaultValue);
}
}
}