protected override void OnOpen(object userData) { base.OnOpen(userData); m_Params = (LoginFormParams)userData; if (m_Params == null) { Log.Warning("LoginFormParams is invalid."); return; } m_VersionText.text = m_Params.Version; m_NoticeButton.onClick.Add(() => { m_NoticePanel.visible = !m_NoticePanel.visible; }); m_AccountButton.onClick.Add(() => { m_LoginPanel.visible = !m_LoginPanel.visible; }); m_RegisterButton.onClick.Add(() => { m_RegisterPanel.visible = true; }); m_LoginButton.onClick.Add(OnLoginClick); m_AccountButton.onClick.Add(OnRegisterClick); }
protected override void OnEnter(ProcedureOwner procedureOwner) { base.OnEnter(procedureOwner); LoginFormParams data = new LoginFormParams(); data.Version = GameEntry.Base.GameVersion; data.OnClickLogin = o => { m_LoginSuccess = true; }; procedureOwner.SetData <VarInt>(Constant.ProcedureData.NextSceneId, (int)SceneId.CreateRole); GameEntry.UI.OpenUIForm(UIFormId.LoginForm, data); }
protected override void OnEnter(ProcedureOwner procedureOwner) { base.OnEnter(procedureOwner); m_ProcedureOwner = procedureOwner; LoginFormParams data = new LoginFormParams(); data.Version = GameEntry.Base.GameVersion; data.OnClickLogin = OnLoginClick; data.OnClickRegister = OnRegisterClick; GameEntry.UI.OpenUIForm(UIFormId.LoginForm, data); }
protected override void OnOpen(object userData) { base.OnOpen(userData); LoginFormParams data = (LoginFormParams)userData; if (data == null) { Log.Warning("LoginFormParams is invalid."); return; } m_VersionText.text = data.Version; m_LoginButton.onClick.Add(obj => data.OnClickLogin(obj)); m_RegisterButton.onClick.Add(obj => data.OnClickRegister(obj)); }