|  | @@ -1,4 +1,3 @@
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |  using System.Collections.Generic;
 |  |  using System.Collections.Generic;
 | 
											
												
													
														|  |  using ET;
 |  |  using ET;
 | 
											
												
													
														|  |  using FairyGUI;
 |  |  using FairyGUI;
 | 
											
										
											
												
													
														|  | @@ -11,7 +10,9 @@ namespace GFGGame
 | 
											
												
													
														|  |      public class BagView : BaseWindow
 |  |      public class BagView : BaseWindow
 | 
											
												
													
														|  |      {
 |  |      {
 | 
											
												
													
														|  |          private UI_BagUI _ui;
 |  |          private UI_BagUI _ui;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |          private ValueBarController _valueBarController;
 |  |          private ValueBarController _valueBarController;
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |          // private List<ItemView> _listItemViews = new List<ItemView>();
 |  |          // private List<ItemView> _listItemViews = new List<ItemView>();
 | 
											
												
													
														|  |          public override void Dispose()
 |  |          public override void Dispose()
 | 
											
												
													
														|  |          {
 |  |          {
 | 
											
										
											
												
													
														|  | @@ -51,14 +52,14 @@ namespace GFGGame
 | 
											
												
													
														|  |              _ui.m_list.onClickItem.Add(OnListItemClick);
 |  |              _ui.m_list.onClickItem.Add(OnListItemClick);
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("tc_bjbj");
 |  |              _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("tc_bjbj");
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |          protected override void AddEventListener()
 |  |          protected override void AddEventListener()
 | 
											
												
													
														|  |          {
 |  |          {
 | 
											
												
													
														|  |              base.AddEventListener();
 |  |              base.AddEventListener();
 | 
											
												
													
														|  |              EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, UpdateList);
 |  |              EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, UpdateList);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | -        
 |  | 
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |          protected override void OnShown()
 |  |          protected override void OnShown()
 | 
											
												
													
														|  |          {
 |  |          {
 | 
											
												
													
														|  |              base.OnShown();
 |  |              base.OnShown();
 | 
											
										
											
												
													
														|  | @@ -74,15 +75,18 @@ namespace GFGGame
 | 
											
												
													
														|  |              {
 |  |              {
 | 
											
												
													
														|  |                  _ui.m_list.ScrollToView(0);
 |  |                  _ui.m_list.ScrollToView(0);
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |              _ui.m_list.numItems = 0;
 |  |              _ui.m_list.numItems = 0;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              base.OnHide();
 |  |              base.OnHide();
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |          protected override void RemoveEventListener()
 |  |          protected override void RemoveEventListener()
 | 
											
												
													
														|  |          {
 |  |          {
 | 
											
												
													
														|  |              base.RemoveEventListener();
 |  |              base.RemoveEventListener();
 | 
											
												
													
														|  |              EventAgent.RemoveEventListener(ConstMessage.ITEM_CHANGED, UpdateList);
 |  |              EventAgent.RemoveEventListener(ConstMessage.ITEM_CHANGED, UpdateList);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |          private void UpdateList()
 |  |          private void UpdateList()
 | 
											
												
													
														|  |          {
 |  |          {
 | 
											
												
													
														|  |              _ui.m_list.numItems = BagDataManager.Instance.BagDatas.Count;
 |  |              _ui.m_list.numItems = BagDataManager.Instance.BagDatas.Count;
 | 
											
										
											
												
													
														|  | @@ -96,6 +100,18 @@ namespace GFGGame
 | 
											
												
													
														|  |              item.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
 |  |              item.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
 | 
											
												
													
														|  |              item.m_txtCount.SetVar("count", itemData.num.ToString()).FlushVars();
 |  |              item.m_txtCount.SetVar("count", itemData.num.ToString()).FlushVars();
 | 
											
												
													
														|  |              item.target.data = itemCfg;
 |  |              item.target.data = itemCfg;
 | 
											
												
													
														|  | 
 |  | +            //是礼包就加入红点
 | 
											
												
													
														|  | 
 |  | +            if ((itemCfg.itemType == ConstItemType.USEABLE &&
 | 
											
												
													
														|  | 
 |  | +                 itemCfg.subType == ConstItemSubType.USEABLE_GIFT_BAG_SELECTABLE) ||
 | 
											
												
													
														|  | 
 |  | +                (itemCfg.itemType == ConstItemType.USEABLE &&
 | 
											
												
													
														|  | 
 |  | +                 itemCfg.subType == ConstItemSubType.USEABLE_GIFT_BAG_RANDOM))
 | 
											
												
													
														|  | 
 |  | +            {
 | 
											
												
													
														|  | 
 |  | +                RedDotController.Instance.SetComRedDot(item.target, true);
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +            else
 | 
											
												
													
														|  | 
 |  | +            {
 | 
											
												
													
														|  | 
 |  | +                RedDotController.Instance.SetComRedDot(item.target, false);
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          private void OnListItemClick(EventContext context)
 |  |          private void OnListItemClick(EventContext context)
 | 
											
										
											
												
													
														|  | @@ -128,6 +144,5 @@ namespace GFGGame
 | 
											
												
													
														|  |          {
 |  |          {
 | 
											
												
													
														|  |              ViewManager.GoBackFrom(typeof(BagView).FullName);
 |  |              ViewManager.GoBackFrom(typeof(BagView).FullName);
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  }
 |  |  }
 |