StudioMetalView.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System.Collections.Generic;
  2. using FairyGUI;
  3. using UI.Studio;
  4. namespace GFGGame
  5. {
  6. //金属副本
  7. public class StudioMetalView : StudioBaseView
  8. {
  9. public override void Dispose()
  10. {
  11. base.Dispose();
  12. }
  13. protected override void OnInit()
  14. {
  15. base.OnInit();
  16. _ui.m_btnBack.onClick.Add(OnClickBtnBack);
  17. }
  18. protected override void OnShown()
  19. {
  20. GComponent com = UIPackage.CreateObject(UI_StudioUI.PACKAGE_NAME, "ComFabric").asCom;
  21. AddChildCom(com);
  22. StudioDataManager.Instance.VIEW_NAME = typeof(StudioMetalView).FullName;
  23. this._studioCfg = StudioCfgArray.Instance.GetCfgsByfunId(typeof(StudioMetalView).Name)[0];
  24. this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(this._studioCfg.type, this._studioCfg.subType, this._studioCfg.id);
  25. list.numItems = this.storyLevelCfgs.Count;
  26. list.ScrollToView(curIndex);
  27. com.GetChild("loaBg").asLoader.url = ResPathUtil.GetBgImgPath("bg_fhl");
  28. com.GetChild("Name").asTextField.text = "金属修复";
  29. com.GetChild("btnChageLine").asLoader.url = ResPathUtil.GetCommonGameResPath("zsx_fl");
  30. base.OnShown();
  31. com.height = _ui.target.height;
  32. }
  33. protected override void OnHide()
  34. {
  35. base.OnHide();
  36. }
  37. private void OnClickBtnBack()
  38. {
  39. ViewManager.GoBackFrom(typeof(StudioMetalView).FullName);
  40. }
  41. }
  42. }