TemplateView.cs 921 B

1234567891011121314151617181920212223242526272829303132333435
  1. /// #pkgName FGUI包名
  2. /// #panelName UIPanel名字
  3. /// #UIName = $"{#pkgName}{#panelName}" UIKey名字
  4. /// 该脚本由模板创建
  5. /// created by cb 2024
  6. using XGame.Framework.FGUI;
  7. using XGame.Framework.UI;
  8. using XGame.Framework.UI.View;
  9. namespace FL.FGUI
  10. {
  11. public static partial class UIKeys
  12. {
  13. private static UIKey _<#UIName>;
  14. public static UIKey <#UIName> => _<#UIName> ?? (_<#UIName> = new UIKey("<#pkgName>", "<#panelName>", typeof(<#UIName>View)));
  15. }
  16. public partial class <#UIName>View : UIView
  17. {
  18. protected override void AddController(IUIControllerGroup group)
  19. {
  20. group.AddController(new <#UIName>Ctrl());
  21. }
  22. protected override IUIViewModel CreateViewModel(IUIPanel panel)
  23. {
  24. return new <#UIName>VM((panel as FguiPanel).Panel);
  25. }
  26. protected override void OnDispose()
  27. {
  28. }
  29. }
  30. }