Beispiel #1
0
        public void UpdateVisible()
        {
            int length = m_RecommendGoodsGroup.Length();

            for (int i = 0; i < length; i++)
            {
                UWarGoodsStoreRecommendComponent component = m_RecommendGoodsGroup.GetItemAt(i) as UWarGoodsStoreRecommendComponent;
                if (component != null)
                {
                    component.SetData(m_ReCommendGoodsItemList[i]);
                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// 根据物品配置ID设置对应的推荐物品配置标签元素选择
 /// </summary>
 /// <param name="_nDispositionID"></param>
 public void SetGoodsStoreTabItemSelected(int _nDispositionID)
 {
     for (int i = 0; i < GoodsStoreTab.Length(); ++i)
     {
         UWarGoodsStoreTabItem item = GoodsStoreTab.GetItemAt(i) as UWarGoodsStoreTabItem;
         if (item != null)
         {
             if (item.DispositionID == _nDispositionID)
             {
                 item.Selected = true;
                 return;
             }
         }
     }
 }
Beispiel #3
0
        public void Init(string _strLocalFilter, string _strLocalKey, int _nDispositionID, UnityAction <UButtonGroupItem, bool> _actionSelected, UButtonGroup _buttonGroup)
        {
            if (!string.IsNullOrEmpty(_strLocalFilter))
            {
                LocalizedText.enabled = true;
                ULocalizationService.Instance.Get(ItemTxt, "UIView", _strLocalFilter, _strLocalKey);
            }

            else
            {
                LocalizedText.enabled = false;
                ItemTxt.text          = _strLocalKey;
            }


            rectTransform.SetParent(_buttonGroup.transform, false);
            this.onSelectedChangedEx.AddListener(_actionSelected);
            m_nItemIndex = _buttonGroup != null?_buttonGroup.Length() : -1;

            m_nDispositionID = _nDispositionID;
            Group            = _buttonGroup;
        }