using UnityEngine; using UnityEngine.UI; using QFramework; namespace QFramework.Example { public class UIModeSelectData : UIPanelData { } public partial class UIModeSelect : UIPanel { protected override void OnInit(IUIData uiData = null) { mData = uiData as UIModeSelectData ?? new UIModeSelectData(); // please add init code here } protected override void OnOpen(IUIData uiData = null) { TechBtn.onClick.AddListener(() => { Hide(); Global.appTpe = Global.AppType.Study; AppContext.Interface.RegisterSystem(new StudySystem()); UIKit.OpenPanelAsync().ToAction().StartGlobal(); }); ExamBtn.onClick.AddListener(() => { Hide(); Global.appTpe = Global.AppType.Exam; AppContext.Interface.RegisterSystem(new ExamSystem()); UIKit.OpenPanelAsync().ToAction().StartGlobal(); }); } protected override void OnShow() { } protected override void OnHide() { } protected override void OnClose() { } } }