设置界面
parent
726c7ac198
commit
5c35531cc7
|
|
@ -53,6 +53,8 @@ public class UI_SettingBinder
|
|||
window.Button_Cancel = window.GetComponent<Button>("Image_SetBG/Button_Cancel");
|
||||
window.Button_Save = window.GetComponent<Button>("Image_SetBG/Button_Save");
|
||||
window.Text_PlayerID = window.GetComponent<TMP_Text>("Image_SetBG/Text_PlayerID");
|
||||
window.Button_Open_CA = window.GetComponent<Button>("Image_SetBG/CameraAnima/Button_Open_CA");
|
||||
window.Button_Close_CA = window.GetComponent<Button>("Image_SetBG/CameraAnima/Button_Close_CA");
|
||||
}
|
||||
|
||||
/****** 定义变量语句 ******
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ public class UI_SettingController : UIWindow
|
|||
public Button Button_Cancel;
|
||||
public Button Button_Save;
|
||||
public TMP_Text Text_PlayerID;
|
||||
public Button Button_Open_CA;
|
||||
public Button Button_Close_CA;
|
||||
|
||||
/// <summary>
|
||||
/// 打开设置界面
|
||||
|
|
@ -93,8 +95,11 @@ public class UI_SettingController : UIWindow
|
|||
BindButton(Button_Open_Effect, OpenEffect);
|
||||
BindButton(Button_Open_Talk, OpenTalk);
|
||||
|
||||
BindButton(Button_Open_Map, OpenGrid);
|
||||
BindButton(Button_Close_Map, CloseGrid);
|
||||
BindButton(Button_Open_Map, EnableGridShow, false);
|
||||
BindButton(Button_Close_Map, EnableGridShow, true);
|
||||
|
||||
BindButton(Button_Open_CA, EnableSkillRotateCamera, false);
|
||||
BindButton(Button_Close_CA, EnableSkillRotateCamera, true);
|
||||
|
||||
BindButton(Button_Cancel, Cancel);
|
||||
BindButton(Button_Save, Save);
|
||||
|
|
@ -102,7 +107,7 @@ public class UI_SettingController : UIWindow
|
|||
Slider_HaveVoice_BGM.onValueChanged.AddListener(OnValueChangedBGM);
|
||||
Slider_HaveVoice_Effect.onValueChanged.AddListener(OnValueChangedEffect);
|
||||
Slider_HaveVoice_Talk.onValueChanged.AddListener(OnValueChangedTalk);
|
||||
|
||||
|
||||
Slider_NoVoice_BGM.interactable = false;
|
||||
Slider_NoVoice_Effect.interactable = false;
|
||||
Slider_NoVoice_Talk.interactable = false;
|
||||
|
|
@ -129,10 +134,10 @@ public class UI_SettingController : UIWindow
|
|||
Set30FrameRate();
|
||||
else
|
||||
Set60FrameRate();
|
||||
if (_settings.IsOpenGrid)
|
||||
CloseGrid();
|
||||
else
|
||||
OpenGrid();
|
||||
|
||||
|
||||
EnableGridShow(_settings.IsOpenGrid);
|
||||
EnableSkillRotateCamera(_settings.enableSkillRotateCamera);
|
||||
}
|
||||
|
||||
private void InitSlider()
|
||||
|
|
@ -143,7 +148,7 @@ public class UI_SettingController : UIWindow
|
|||
Slider_NoVoice_Effect.value = _settings.EffectValue;
|
||||
Slider_HaveVoice_Talk.value = _settings.TalkValue;
|
||||
Slider_NoVoice_Talk.value = _settings.TalkValue;
|
||||
|
||||
|
||||
if (_settings.BGMValue <= 0)
|
||||
CloseBGM();
|
||||
else
|
||||
|
|
@ -246,7 +251,7 @@ public class UI_SettingController : UIWindow
|
|||
Slider_HaveVoice_Talk.value = 0.5f;
|
||||
_settings.TalkValue = Slider_HaveVoice_Talk.value;
|
||||
}
|
||||
|
||||
|
||||
private void OnValueChangedBGM(float value)
|
||||
{
|
||||
_settings.BGMValue = value;
|
||||
|
|
@ -274,16 +279,16 @@ public class UI_SettingController : UIWindow
|
|||
CloseTalk();
|
||||
}
|
||||
|
||||
private void OpenGrid()
|
||||
private void EnableGridShow(bool enable)
|
||||
{
|
||||
_settings.IsOpenGrid = false;
|
||||
Button_Close_Map.gameObject.SetActive(true);
|
||||
_settings.IsOpenGrid = enable;
|
||||
Button_Close_Map.gameObject.SetActive(!enable);
|
||||
}
|
||||
|
||||
private void CloseGrid()
|
||||
private void EnableSkillRotateCamera(bool enable)
|
||||
{
|
||||
_settings.IsOpenGrid = true;
|
||||
Button_Close_Map.gameObject.SetActive(false);
|
||||
_settings.enableSkillRotateCamera = enable;
|
||||
Button_Close_CA.gameObject.SetActive(!enable);
|
||||
}
|
||||
|
||||
private void FormatText(TMP_Text tmpText, float value)
|
||||
|
|
@ -292,9 +297,9 @@ public class UI_SettingController : UIWindow
|
|||
}
|
||||
|
||||
private void Save()
|
||||
{
|
||||
{
|
||||
GameSettingManager.Instance.SaveNewSettings(_settings);
|
||||
|
||||
|
||||
rawImageGaussianBlurMask.texture = CommonUtils.GetScreenTexture2D();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue