| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 | 
							- using ET;
 
- using UI.Main;
 
- using static GFGGame.LauncherConfig;
 
- namespace GFGGame
 
- {
 
-     public class RoleInfoView : BaseWindow
 
-     {
 
-         private UI_RoleInfoUI _ui;
 
-         public override void Dispose()
 
-         {
 
-             if (_ui != null)
 
-             {
 
-                 _ui.Dispose();
 
-             }
 
-             _ui = null;
 
-             base.Dispose();
 
-         }
 
-         protected override void OnInit()
 
-         {
 
-             base.OnInit();
 
-             _ui = UI_RoleInfoUI.Create();
 
-             this.viewCom = _ui.target;
 
-             this.viewCom.Center();
 
-             this.modal = true;
 
-             _ui.m_txtVersion.text = GameGlobal.version;
 
-             _ui.m_txtSlogan.maxLength = GlobalCfgArray.globalCfg.maxSloganWordsCount;
 
-             _ui.m_btnExit.onClick.Add(OnClickBtnExit);
 
-             _ui.m_btnLogout.onClick.Add(OnClickBtnLogout);
 
-             _ui.m_btnSound.onClick.Add(OnClickBtnSound);
 
-             _ui.m_btnMusic.onClick.Add(OnClickBtnMusic);
 
-             _ui.m_btnHelp.onClick.Add(OnClickBtnHelp);
 
-             _ui.m_txtSlogan.onFocusOut.Add(OnFocuseOut);
 
-             _ui.m_loaChangeName.onClick.Add(OnClickLoaChangeName);
 
-         }
 
-         protected override void AddEventListener()
 
-         {
 
-             base.AddEventListener();
 
-             EventAgent.AddEventListener(ConstMessage.CHANGE_ROLE_NAME, UpdateRoleName);
 
-         }
 
-         protected override void OnShown()
 
-         {
 
-             base.OnShown();
 
-             _ui.m_txtRoleName.text = RoleDataManager.roleName;
 
-             _ui.m_txtLvl.text = "" + GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl);
 
-             RoleLevelCfg roleLevelCfg = RoleLevelCfgArray.Instance.GetCfg(GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl));
 
-             if (roleLevelCfg.exp > 0)
 
-             {
 
-                 _ui.m_proBarExp.value = GameGlobal.myNumericComponent.GetAsInt(NumericType.Exp);
 
-                 _ui.m_proBarExp.max = roleLevelCfg.exp;
 
-             }
 
-             else
 
-             {
 
-                 _ui.m_proBarExp.text = "已满级";
 
-             }
 
-             _ui.m_btnSound.selected = SoundManager.Instance.isOn;
 
-             _ui.m_btnMusic.selected = MusicManager.Instance.isOn;
 
-             _ui.m_txtSlogan.text = RoleDataManager.slogan;
 
-         }
 
-         protected override void OnHide()
 
-         {
 
-             base.OnHide();
 
-         }
 
-         protected override void RemoveEventListener()
 
-         {
 
-             base.RemoveEventListener();
 
-             EventAgent.RemoveEventListener(ConstMessage.CHANGE_ROLE_NAME, UpdateRoleName);
 
-         }
 
-         private void UpdateRoleName()
 
-         {
 
-             _ui.m_txtRoleName.text = RoleDataManager.roleName;
 
-         }
 
-         private void OnClickBtnExit()
 
-         {
 
-             AlertSystem.Show("确认返回登录页吗?")
 
-                 .SetLeftButton(true)
 
-                 .SetRightButton(true, "确认", (object data) =>
 
-                 {
 
-                     GameController.QuitToLoginView(false);
 
-                 });
 
-         }
 
-         private void OnClickBtnLogout()
 
-         {
 
-             AlertSystem.Show("确认注销当前账号吗?")
 
-                 .SetLeftButton(true)
 
-                 .SetRightButton(true, "确认", (object data) =>
 
-                 {
 
-                     GameController.QuitToLoginView(true);
 
-                 });
 
-         }
 
-         private void OnClickBtnSound()
 
-         {
 
-             SoundManager.Instance.isOn = _ui.m_btnSound.selected;
 
-         }
 
-         private void OnClickBtnMusic()
 
-         {
 
-             MusicManager.Instance.isOn = _ui.m_btnMusic.selected;
 
-         }
 
-         private void OnClickBtnHelp()
 
-         {
 
-             if (GameConfig.showGM >= 1)
 
-             {
 
-                 ViewManager.Show(ViewName.GM_PANEL_VIEW);
 
-             }
 
-             else
 
-             {
 
-                 ViewManager.Show(ViewName.LOG_VIEW);
 
-             }
 
-         }
 
-         private async void OnFocuseOut()
 
-         {
 
-             _ui.m_txtSlogan.text = await RoleInfoSProxy.ReqModifySlogan(_ui.m_txtSlogan.text);
 
-         }
 
-         private void OnClickLoaChangeName()
 
-         {
 
-             ViewManager.Show<ChangeNameView>(null, new object[] { typeof(RoleInfoView).FullName, this.viewData });
 
-         }
 
-     }
 
- }
 
 
  |