TemplateCtrl.ts 908 B

12345678910111213141516171819202122232425262728293031323334
  1. /// #pkgName FGUI包名
  2. /// #prefabName ui预制名字
  3. /// #viewName uiview名字
  4. /// #UIName ui的名字,prefabName首字母转大写
  5. /// ui逻辑处理类
  6. /// created by chenwb 2024
  7. import FguiMgr from "../../../../frameWork/fgui/FguiMgr";
  8. import { FguiViewCtrl } from "../../../../frameWork/fgui/mvc/FguiViewCtrl";
  9. import { <#UIName>VM } from "./<#UIName>VM";
  10. import { <#UIName>View } from "./<#UIName>View";
  11. export class <#UIName>Ctrl extends FguiViewCtrl<<#UIName>VM> {
  12. OnInited(): void {
  13. }
  14. OnShow(intent?: any): void {
  15. this.AddListeners();
  16. }
  17. OnHide(): void {
  18. this.RemoveListeners();
  19. }
  20. //#region UI事件
  21. private AddListeners() : void {
  22. <#UIEventsAddArea>
  23. }
  24. private RemoveListeners() : void {
  25. <#UIEventsRemoveArea>
  26. }
  27. <#UIEventsDefineArea>
  28. private Close(): void{
  29. FguiMgr.Instance.closeUI(<#UIName>View);
  30. }
  31. //#endregion
  32. }