ClothingUpgradeView.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. using System.Collections.Generic;
  3. using ET;
  4. using FairyGUI;
  5. using UI.CommonGame;
  6. using UI.ClothingUpgrade;
  7. using UnityEngine;
  8. namespace GFGGame
  9. {
  10. public class ClothingUpgradeView : BaseWindow
  11. {
  12. private UI_ClothingUpgradeUI _ui;
  13. private int _partIndex;
  14. public override void Dispose()
  15. {
  16. base.Dispose();
  17. }
  18. protected override void OnInit()
  19. {
  20. base.OnInit();
  21. packageName = UI_ClothingSelectUI.PACKAGE_NAME;
  22. _ui = UI_ClothingUpgradeUI.Create();
  23. this.viewCom = _ui.target;
  24. isfullScreen = true;
  25. modal = true;
  26. _ui.m_btnBack.onClick.Add(OnClickBtnBack);
  27. }
  28. protected override void OnShown()
  29. {
  30. base.OnShown();
  31. if (this.viewData != null)
  32. {
  33. _partIndex = (int)(this.viewData as object[])[0];
  34. }
  35. UpdateItems();
  36. }
  37. protected override void OnHide()
  38. {
  39. base.OnHide();
  40. }
  41. private void UpdateItems()
  42. {
  43. _ui.m_c1.selectedIndex = 4;
  44. }
  45. private void OnClickBtnBack()
  46. {
  47. ViewManager.GoBackFrom(typeof(ClothingUpgradeView).FullName);
  48. }
  49. }
  50. }