PC_TitlePanel.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using Chiva.Toolkit.Function.NoBorder;
  2. using UnityEngine;
  3. using UnityEngine.UI;
  4. using QFramework;
  5. namespace QFramework
  6. {
  7. public class PC_TitlePanelData : UIPanelData
  8. {
  9. }
  10. public partial class PC_TitlePanel : UIPanel
  11. {
  12. protected override void ProcessMsg(int eventId, QMsg msg)
  13. {
  14. throw new System.NotImplementedException();
  15. }
  16. protected override void OnInit(IUIData uiData = null)
  17. {
  18. mData = uiData as PC_TitlePanelData ?? new PC_TitlePanelData();
  19. MinBtn.onClick.AddListener(() => WindowsSetting.Instance.OnMinBtnClick());
  20. CloseBtn.onClick.AddListener(() =>
  21. {
  22. });
  23. TrainBtn.onClick.AddListener(() =>
  24. {
  25. UIKit.OpenPanel<PC_NonTrainingPanel>();
  26. });
  27. }
  28. protected override void OnOpen(IUIData uiData = null)
  29. {
  30. }
  31. protected override void OnShow()
  32. {
  33. }
  34. protected override void OnHide()
  35. {
  36. }
  37. protected override void OnClose()
  38. {
  39. }
  40. public void SetBtnsState(bool state)
  41. {
  42. CloseBtn.gameObject.SetActive(state);
  43. MinBtn.gameObject.SetActive(state);
  44. TrainBtn.gameObject.SetActive(state);
  45. }
  46. }
  47. }