StoreView.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. using UI.RechargeStore;
  2. using UI.CommonGame;
  3. using FairyGUI;
  4. using System.Collections.Generic;
  5. using ET;
  6. namespace GFGGame
  7. {
  8. public class StoreView : BaseWindow
  9. {
  10. private Dictionary<int, Dictionary<int, List<string>>> _tabDic = new Dictionary<int, Dictionary<int, List<string>>>();
  11. private Dictionary<int, List<string>> _subTabChargeDic = new Dictionary<int, List<string>>();
  12. private Dictionary<int, List<string>> _subTabGiftBagDic = new Dictionary<int, List<string>>();
  13. private Dictionary<int, List<string>> _subTabMonthCardDic = new Dictionary<int, List<string>>();
  14. private Dictionary<int, List<string>> _subTabExchangeDic = new Dictionary<int, List<string>>();
  15. private Dictionary<int, List<string>> _subTabArenaDic = new Dictionary<int, List<string>>();
  16. private UI_StoreUI _ui;
  17. private ValueBarController _valueBarController;
  18. public override void Dispose()
  19. {
  20. if (_valueBarController != null)
  21. {
  22. _valueBarController.Dispose();
  23. _valueBarController = null;
  24. }
  25. if (_ui != null)
  26. {
  27. _ui.Dispose();
  28. }
  29. _ui = null;
  30. base.Dispose();
  31. }
  32. protected override void OnInit()
  33. {
  34. base.OnInit();
  35. packageName = UI_StoreUI.PACKAGE_NAME;
  36. _ui = UI_StoreUI.Create();
  37. this.viewCom = _ui.target;
  38. isfullScreen = true;
  39. _tabDic[0] = _subTabChargeDic;
  40. _tabDic[1] = _subTabGiftBagDic;
  41. _tabDic[2] = _subTabMonthCardDic;
  42. _tabDic[3] = _subTabExchangeDic;
  43. _tabDic[4] = _subTabArenaDic;
  44. _subTabChargeDic[0] = new List<string>() { "充值", "累计充值" };//充值
  45. _subTabGiftBagDic[0] = new List<string>() { "活动", "限时", "精选", "热销" };//礼包
  46. _subTabMonthCardDic[0] = new List<string>() { "金卡", "黑金卡" };//月卡
  47. _subTabExchangeDic[0] = new List<string>() { "画廊商城" };//兑换
  48. _subTabArenaDic[0] = new List<string>() { "道具" };//竞技场
  49. _subTabChargeDic[1] = new List<string>() { "RechargeStoreView" };//充值
  50. _subTabGiftBagDic[1] = new List<string>() { "GiftBagBuyView" };//礼包
  51. _subTabMonthCardDic[1] = new List<string>() { };//月卡
  52. _subTabExchangeDic[1] = new List<string>() { "ItemExchangeView" };//兑换
  53. _subTabArenaDic[1] = new List<string>() { "" };//竞技场
  54. _ui.m_btnBack.onClick.Add(OnClickBtnBack);
  55. _valueBarController = new ValueBarController(_ui.m_valueBar);
  56. _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("scsc_bjbj");
  57. }
  58. protected override void AddEventListener()
  59. {
  60. base.AddEventListener();
  61. }
  62. protected override void OnShown()
  63. {
  64. base.OnShown();
  65. _valueBarController.OnShown();
  66. }
  67. protected override void OnHide()
  68. {
  69. base.OnHide();
  70. _valueBarController.OnHide();
  71. }
  72. protected override void RemoveEventListener()
  73. {
  74. base.RemoveEventListener();
  75. }
  76. private void OnClickBtnBack()
  77. {
  78. this.Hide();
  79. }
  80. private void UpdateRedDot()
  81. {
  82. }
  83. }
  84. }