// --------------------------------- // Func // --------------------------------- void SetPopuplistItem() { UIPopupList popupList = FactoryReplicator.m_MenuContent.popList; popupList.items.Clear(); popupList.items.Add(this.m_AllStr); if (m_RootType == ItemLabel.Root.all) { } else { popupList.items.AddRange(ItemLabel.GetDirectChildrenName((int)m_RootType)); //foreach (KeyValuePair<int, int> kv in ItemType.s_tblItemFather) //{ // if (kv.Value != -1 && (int)m_RootType == kv.Value) // { // popupList.items.Add(ItemType.s_tblItemType[kv.Key]); // } //} } if (popupList.items.Count > 0) { popupList.selection = popupList.items[0]; } UpdateLeftList(true); }
private void SetPopuplistItem(bool useScerch) { LockChange = true; mPopuplist.items.Clear(); mPopuplist.items.Add(m_AllStr); if (mRootType == ItemLabel.Root.all) { } else { mPopuplist.items.AddRange(ItemLabel.GetDirectChildrenName((int)mRootType)); } if (mPopuplist.items.Count > 0) { mPopuplist.selection = mPopuplist.items[0]; } mItemType = 0; UpdateLeftList(useScerch); LockChange = false; }