示例#1
0
 /// 设置所属ListView控件脚本及索引
 public void SetBelongedList(UIListView belongedListScript, int index)
 {
     BelongedListView = belongedListScript;
     IndexInListView  = index;
     //
     SetSortingOrder(BelongedListView.BelongedForm.GetSortingOrder());
 }
        /// Enable元素
        public void Enable(UIListView belongedList, int index, string name, ref stRect rect, bool selected)
        {
            m_belongedListScript = belongedList;
            m_index = index;
            //
            gameObject.name = name + "_" + index.ToString();

            if (m_useSetActiveForDisplay)
            {
                gameObject.ExtSetActive(true);
            }
            else
            {
                m_canvasGroup.alpha          = 1f;
                m_canvasGroup.blocksRaycasts = true;
            }
            //递归设置从属List
            SetComponentBelongedList(gameObject);
            //设置位置属性
            SetRect(ref rect);
            //设置选中/非选中外观
            ChangeDisplay(selected);
        }