Files
BlueArchiveMiniGame/Assets/Scripts/HotUpdate/Main/UI/SettingWindow/GeneralPanel.cs

26 lines
721 B
C#
Raw Normal View History

2025-09-29 07:45:07 +08:00
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class GeneralPanel : UIBasePanel,ISettingsPanel
{
[SerializeField] private TMP_InputField serverAddressInput;
2025-09-29 11:03:26 +08:00
string serverAddress;
2025-09-29 07:45:07 +08:00
public override void OnShow()
{
serverAddressInput.text = SettingsManager.Inst.CurrentSettings.serverAddress;
}
public void OnServerAddressChanged(string value)
{
2025-09-29 11:03:26 +08:00
serverAddress = value;
2025-09-29 07:45:07 +08:00
}
public void ApplySettings()
{
2025-09-29 11:03:26 +08:00
SettingsManager.Inst.CurrentSettings.serverAddress = serverAddress;
2025-09-29 07:45:07 +08:00
}
public void ResetToDefault()
{
2025-09-29 11:03:26 +08:00
SettingsManager.Inst.CurrentSettings.serverAddress = serverAddress = SettingsManager.Inst.DefSetting.serverAddress;
2025-09-29 07:45:07 +08:00
}
}