TemplateView.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /// #pkgName FGUI包名
  2. /// #prefabName ui预制名字
  3. /// #viewName uiview名字
  4. /// #UIName ui的名字,prefabName首字母转大写
  5. /// 该脚本由模板创建,不可修改
  6. /// created by chenwb 2024
  7. import { FguiView } from "../../../../frameWork/fgui/mvc/FguiView";
  8. import { FguiViewModel } from "../../../../frameWork/fgui/mvc/FguiViewModel";
  9. import { IUIController } from "../../../../frameWork/fgui/mvc/IUIController";
  10. import { ViewZorder } from "../../../../data/const/ViewZOrder";
  11. import { <#UIName>Ctrl } from "./<#UIName>Ctrl";
  12. import { <#UIName>VM } from "./<#UIName>VM";
  13. export class <#UIName>View extends FguiView {
  14. /**
  15. * fgui的包名
  16. */
  17. protected static pkgName = "<#pkgName>";
  18. /**
  19. * fgui包内的UI名字
  20. */
  21. protected static prefabName = "<#prefabName>";
  22. /**
  23. * 类名,用于给UI命名
  24. */
  25. protected static viewName = "<#UIName>View";
  26. /**
  27. * view层级
  28. */
  29. public zOrder: number = ViewZorder.UI;
  30. protected createVM(panel: fgui.GComponent): FguiViewModel {
  31. return new <#UIName>VM(panel);
  32. }
  33. protected CreateCtrl(): IUIController {
  34. return new <#UIName>Ctrl();
  35. }
  36. }