using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UIElements; using MuHua; /// /// 登录页面 /// public class UILoginPage : ModuleUIPage { private UILoginPanel loginPanel; private UIRegisterPanel registerPanel; public override VisualElement Element => root.Q("LoginPage"); public VisualElement LoginPanel => Q("LoginPanel"); public VisualElement RegisterPanel => Q("RegisterPanel"); private void Awake() { loginPanel = new UILoginPanel(LoginPanel, this); registerPanel = new UIRegisterPanel(RegisterPanel, this); ModuleUI.OnJumpPage += ModuleUI_OnJumpPage; } private void ModuleUI_OnJumpPage(EnumPage page) { Element.EnableInClassList("document-page-hide", page != EnumPage.Login); if (page != EnumPage.Login) { return; } OpenLoginPanel(); } public void OpenLoginPanel() { loginPanel.Resetting(false); registerPanel.Resetting(true); } public void OpenRegisterPanel() { loginPanel.Resetting(true); registerPanel.Resetting(false); } } /// /// 登录面板 /// public class UILoginPanel : ModuleUIPanel { private string username; private string password; public Label Title => Q