public override void Close() { Sc_ForgingContainList.SelectedItem = null; CurrentForingType = DefultType; CloseSelectPanel(); CurrentData = null; base.Close(); }
void Awake() { Eff_ForgeButton = CreatObjectToNGUI.InstantiateObj(Prefab_ForgeButtonEff, ForgeButton.transform); CurrentForingType = DefultType; BackButton.SetCallBackFuntion(OnBackButtonClick); ForgeButton.SetCallBackFuntion(OnForgeButtonClick); RegUIEvent(); TaskGuideBtnRegister(); }
public override void Show(params object[] value) { base.Show(value); if (value.Length > 0) { CurrentForingType = (ForgingType)value[0]; } else { CurrentForingType = ForgingType.ForgEquipment; } selectButtonPanel.UpdateSelectButton(); InitList(); }
/// <summary> ///城镇主界面功能按钮配置数据 /// </summary> public List <ForgeRecipeData> ForgeRecipeDataList(ForgingType type) { switch (type) { case ForgingType.ForgEquipment: return(m_ForgeRecipeData_Equip); case ForgingType.ForgGiftBox: return(m_ForgeRecipeData_GiftBox); case ForgingType.ForgMaterial: return(m_ForgeRecipeData_Material); default: return(null); } }
private IEnumerator St_InitListItem() { // ItemTable.transform.ClearChild(); ItemList.ApplyAllItem(c => c.gameObject.SetActive(false)); InitItemFileinfoList(); if (ForgeRecipeDataList.Count > 0) { // if(ForgeRecipeDataList.Count>=4) // { for (int i = 0; i < ForgeRecipeDataList.Count; i++) { if (ItemList.Count > i) { ItemList[i].gameObject.SetActive(true); ItemList[i].InitItemData(ForgeRecipeDataList[i]); } else { Item_go = NGUITools.AddChild(ItemTable.gameObject, FriendListItemPrefab); Item_go.name = FriendListItemPrefab.name + i; Item_go.RegisterBtnMappingId(ForgeRecipeDataList[i].ForgeID, UI.MainUI.UIType.Forging, BtnMapId_Sub.Forging_ForgingItem); Item_go.AddComponent <UIDragPanelContents>(); ForgingListItem Sc_item = Item_go.GetComponent <ForgingListItem>(); Sc_item.InitItemData(ForgeRecipeDataList[i]); Sc_item.OnClickCallBack = ItemSelectedEventHandle; ItemList.Add(Sc_item); } } if (ForgingPanelManager.GetInstance().CurrentForingType == CurrentListType) { if (SelectedItem != null) { SelectedItem.BeSelected(); } else { ItemList[0].BeSelected(); } } else { ItemList[0].BeSelected(); } CurrentListType = ForgingPanelManager.GetInstance().CurrentForingType; yield return(null); ItemTable.Reposition(); m_dragPanelComp.ResetPosition(); // yield return null; //如果有引导箭头,不允许拖动 if (HasGuideArrow) { m_dragPanelComp.LockDraggable = true; } else { m_dragPanelComp.LockDraggable = false; } } else { } }
public void SetCurrentForingType(ForgingType type) { CurrentForingType = type; }