PartnerSbStrengthPanelCtrl.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /// #pkgName FGUI包名
  2. /// #panelName UIPanel名字
  3. /// #UIName = $"{#pkgName}{#panelName}" UIKey名字
  4. /// 该脚本由模板创建
  5. /// created by cb 2024
  6. using FairyGUI;
  7. using XGame.Framework.UI;
  8. namespace FL.FGUI
  9. {
  10. /// <summary>
  11. /// UI逻辑处理类
  12. /// </summary>
  13. /// <typeparam name=""></typeparam>
  14. public partial class PartnerSbStrengthPanelCtrl : UIController<PartnerSbStrengthPanelVM>
  15. {
  16. protected override void OnEnable(object intent)
  17. {
  18. AddUIListenres();
  19. }
  20. protected override void OnDisable()
  21. {
  22. RemoveUIListenres();
  23. }
  24. #region UI事件
  25. private void AddUIListenres()
  26. {
  27. VM.UpBtn.onClick.Add(OnClickUpBtn);
  28. VM.LeftBtn.onClick.Add(OnClickLeftBtn);
  29. VM.RightBtn.onClick.Add(OnClickRightBtn);
  30. VM.MwSet.onClick.Add(OnClickMwSet);
  31. }
  32. private void RemoveUIListenres()
  33. {
  34. VM.UpBtn.onClick.Remove(OnClickUpBtn);
  35. VM.LeftBtn.onClick.Remove(OnClickLeftBtn);
  36. VM.RightBtn.onClick.Remove(OnClickRightBtn);
  37. VM.MwSet.onClick.Remove(OnClickMwSet);
  38. }
  39. private void OnClickUpBtn(EventContext context)
  40. {
  41. }
  42. private void OnClickLeftBtn(EventContext context)
  43. {
  44. }
  45. private void OnClickRightBtn(EventContext context)
  46. {
  47. }
  48. private void OnClickMwSet(EventContext context)
  49. {
  50. }
  51. #endregion
  52. }
  53. }