换皮
This commit is contained in:
@@ -104,18 +104,18 @@ namespace ChillConnect
|
||||
|
||||
private void UpdataAvatar(object obj = null)
|
||||
{
|
||||
var head = ui.btn_head.head as btn_head;
|
||||
// var head = ui.btn_head.head as btn_head;
|
||||
|
||||
// GameHelper.SetSelfAvatar(head.load_avatar);
|
||||
}
|
||||
|
||||
private void InitView()
|
||||
{
|
||||
var namStr = GameHelper.GetUserName();
|
||||
ui.edit_name.input.text = namStr;
|
||||
ui.edit_name.btn_amend.SetClick(SaveName);
|
||||
// var namStr = GameHelper.GetUserName();
|
||||
// ui.edit_name.input.text = namStr;
|
||||
// ui.edit_name.btn_amend.SetClick(SaveName);
|
||||
|
||||
ui.btn_back.SetClick(OnCloseView);
|
||||
// ui.btn_back.SetClick(OnCloseView);
|
||||
// ui.btn_music.SetClick(OnClickSetMusic);
|
||||
// ui.btn_sound.SetClick(OnClickSoundBtn);
|
||||
|
||||
@@ -123,74 +123,74 @@ namespace ChillConnect
|
||||
// ui.btn_terms.menus.selectedIndex = btn_menu.Menus_terms;
|
||||
// ui.btn_official.menus.selectedIndex = btn_menu.Menus_official;
|
||||
// ui.btn_credits.menus.selectedIndex = btn_menu.Menus_credits;
|
||||
ui.btn_privacy.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 0); });
|
||||
ui.btn_terms.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 1); });
|
||||
ui.btn_official.SetClick(() => { OpenBrowser.OpenURL("https://www.chillconnect.fun"); });
|
||||
ui.btn_email.SetClick(() => {
|
||||
//OpenBrowser.OpenEmailClient(ConfigSystem.GetConfig<CommonModel>().contactUs, "Please select an email application");
|
||||
GameHelper.OpenEmail();
|
||||
});
|
||||
ui.btn_exit.SetClick(OnCloseView);
|
||||
// ui.btn_privacy.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 0); });
|
||||
// ui.btn_terms.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 1); });
|
||||
// ui.btn_official.SetClick(() => { OpenBrowser.OpenURL("https://www.chillconnect.fun"); });
|
||||
// ui.btn_email.SetClick(() => {
|
||||
// //OpenBrowser.OpenEmailClient(ConfigSystem.GetConfig<CommonModel>().contactUs, "Please select an email application");
|
||||
// GameHelper.OpenEmail();
|
||||
// });
|
||||
// ui.btn_exit.SetClick(OnCloseView);
|
||||
|
||||
// ui.btn_credits.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 2); });
|
||||
SetUID();
|
||||
SetVersion();
|
||||
RefreshMusicUI();
|
||||
// SetUID();
|
||||
// SetVersion();
|
||||
// RefreshMusicUI();
|
||||
|
||||
// 初始化滑动条位置
|
||||
ui.sound_slider.min = 0f;
|
||||
ui.sound_slider.max = 1f;
|
||||
// // 初始化滑动条位置
|
||||
// ui.sound_slider.min = 0f;
|
||||
// ui.sound_slider.max = 1f;
|
||||
|
||||
// 添加滑动条变化事件监听
|
||||
ui.sound_slider.onChanged.Add(() =>
|
||||
{
|
||||
var sound = (float)Math.Round(ui.sound_slider.value, 2);
|
||||
Debug.Log("sound 滑动条当前的值=== " + sound);
|
||||
// // 添加滑动条变化事件监听
|
||||
// ui.sound_slider.onChanged.Add(() =>
|
||||
// {
|
||||
// var sound = (float)Math.Round(ui.sound_slider.value, 2);
|
||||
// Debug.Log("sound 滑动条当前的值=== " + sound);
|
||||
|
||||
GRoot.inst.soundVolume = sound;
|
||||
PlayerPrefs.SetFloat("soundVolume", sound);
|
||||
});
|
||||
// GRoot.inst.soundVolume = sound;
|
||||
// PlayerPrefs.SetFloat("soundVolume", sound);
|
||||
// });
|
||||
|
||||
ui.music_slider.min = 0f;
|
||||
ui.music_slider.max = 1f;
|
||||
ui.music_slider.onChanged.Add(() =>
|
||||
{
|
||||
var sound = (float)Math.Round(ui.music_slider.value, 2);
|
||||
Debug.Log("music 滑动条当前的值=== " + sound);
|
||||
PlayerPrefs.SetFloat("musicSound", sound);
|
||||
AudioManager.Instance.SetBGMSound();
|
||||
// ui.music_slider.min = 0f;
|
||||
// ui.music_slider.max = 1f;
|
||||
// ui.music_slider.onChanged.Add(() =>
|
||||
// {
|
||||
// var sound = (float)Math.Round(ui.music_slider.value, 2);
|
||||
// Debug.Log("music 滑动条当前的值=== " + sound);
|
||||
// PlayerPrefs.SetFloat("musicSound", sound);
|
||||
// AudioManager.Instance.SetBGMSound();
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
ui.btn_head.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PersonViewUI_Open); });
|
||||
// ui.btn_head.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PersonViewUI_Open); });
|
||||
|
||||
if (GameHelper.IsGiftSwitch()) {
|
||||
ui.btn_restore.visible = false;
|
||||
}
|
||||
ui.btn_restore.SetClick(() =>
|
||||
{
|
||||
// ApplePayManager.Instance.AppleRestore((success,message)=>{
|
||||
// Debug.Log("[barry] restore success message: " + message);
|
||||
// if (success)
|
||||
// {
|
||||
// Debug.Log("[barry] restore success: " + success);
|
||||
// GameHelper.ShowTips("Restore Purchases Success!");
|
||||
// // SaveData.GetSaveObject().is_get_packreward = success;
|
||||
// if (!GameHelper.IsGiftSwitch())
|
||||
// {
|
||||
// SaveData.GetSaveObject().is_get_removead = success;
|
||||
// }
|
||||
// SaveData.GetSaveObject().have_slot = success;
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.noads_refresh);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // Debug.Log("[barry] restore failed: " + success);
|
||||
// GameHelper.ShowTips("There are no recoverable transactions");
|
||||
// }
|
||||
// });
|
||||
CtrlCloseUI();
|
||||
});
|
||||
// if (GameHelper.IsGiftSwitch()) {
|
||||
// ui.btn_restore.visible = false;
|
||||
// }
|
||||
// ui.btn_restore.SetClick(() =>
|
||||
// {
|
||||
// // ApplePayManager.Instance.AppleRestore((success,message)=>{
|
||||
// // Debug.Log("[barry] restore success message: " + message);
|
||||
// // if (success)
|
||||
// // {
|
||||
// // Debug.Log("[barry] restore success: " + success);
|
||||
// // GameHelper.ShowTips("Restore Purchases Success!");
|
||||
// // // SaveData.GetSaveObject().is_get_packreward = success;
|
||||
// // if (!GameHelper.IsGiftSwitch())
|
||||
// // {
|
||||
// // SaveData.GetSaveObject().is_get_removead = success;
|
||||
// // }
|
||||
// // SaveData.GetSaveObject().have_slot = success;
|
||||
// // GameDispatcher.Instance.Dispatch(GameMsg.noads_refresh);
|
||||
// // }
|
||||
// // else
|
||||
// // {
|
||||
// // // Debug.Log("[barry] restore failed: " + success);
|
||||
// // GameHelper.ShowTips("There are no recoverable transactions");
|
||||
// // }
|
||||
// // });
|
||||
// CtrlCloseUI();
|
||||
// });
|
||||
|
||||
|
||||
}
|
||||
@@ -199,12 +199,12 @@ namespace ChillConnect
|
||||
private void SetVersion()
|
||||
{
|
||||
// Debug.Log($"SetVersion====== {Application.version}");
|
||||
ui.text_version.SetVar("count", Application.version).FlushVars();
|
||||
// ui.text_version.SetVar("count", Application.version).FlushVars();
|
||||
}
|
||||
|
||||
private void SetUID()
|
||||
{
|
||||
ui.text_uid.SetVar("UID", GameHelper.GetLoginModel().Uid.ToString()).FlushVars();
|
||||
// ui.text_uid.SetVar("UID", GameHelper.GetLoginModel().Uid.ToString()).FlushVars();
|
||||
}
|
||||
|
||||
public override void OnSwitchLanguage()
|
||||
@@ -229,23 +229,23 @@ namespace ChillConnect
|
||||
|
||||
private void SaveName()
|
||||
{
|
||||
var name = ui.edit_name.input.text;
|
||||
Debug.Log($"SaveName=== {name}");
|
||||
if (string.IsNullOrEmpty(name) || name.IsNullOrWhiteSpace())
|
||||
{
|
||||
GameHelper.ShowTips("The input cannot be null", true);
|
||||
return;
|
||||
}
|
||||
|
||||
// if (name.Equals(GameHelper.GetPlayerInviteCode()))
|
||||
// var name = ui.edit_name.input.text;
|
||||
// Debug.Log($"SaveName=== {name}");
|
||||
// if (string.IsNullOrEmpty(name) || name.IsNullOrWhiteSpace())
|
||||
// {
|
||||
// GameHelper.ShowTips("The input cannot be null", true);
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (name.Equals(DataMgr.PlayerName)) return;
|
||||
// // if (name.Equals(GameHelper.GetPlayerInviteCode()))
|
||||
// // {
|
||||
// // return;
|
||||
// // }
|
||||
|
||||
GameHelper.ShowTips("Name changed successfully");
|
||||
DataMgr.PlayerName.Value = name;
|
||||
// if (name.Equals(DataMgr.PlayerName)) return;
|
||||
|
||||
// GameHelper.ShowTips("Name changed successfully");
|
||||
// DataMgr.PlayerName.Value = name;
|
||||
}
|
||||
|
||||
private void OnClickSetMusic()
|
||||
@@ -268,10 +268,10 @@ namespace ChillConnect
|
||||
// model.IsOpenEffect ? btn_sound_on_off.On_off_on : btn_sound_on_off.On_off_off;
|
||||
// Debug.Log("barry GRoot.inst.soundVolume的值=== " + GRoot.inst.soundVolume);
|
||||
|
||||
ui.sound_slider.value = GRoot.inst.soundVolume;
|
||||
// ui.sound_slider.value = GRoot.inst.soundVolume;
|
||||
|
||||
// Debug.Log("barry music volume的值=== " + PlayerPrefs.GetFloat("musicSound", 1.0f));
|
||||
ui.music_slider.value = PlayerPrefs.GetFloat("musicSound", 1.0f);
|
||||
// // Debug.Log("barry music volume的值=== " + PlayerPrefs.GetFloat("musicSound", 1.0f));
|
||||
// ui.music_slider.value = PlayerPrefs.GetFloat("musicSound", 1.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user