protected override void ItemAddListion(UGUIItemFunction func) { base.ItemAddListion(func); CreateOfferItemFunc itemFunc = func as CreateOfferItemFunc; itemFunc.cancelAddOffer = CancelAddOffer; }
protected override void ItemAddListion(UGUIItemFunction func) { base.ItemAddListion(func); ProductItemFunction itemFunc = func as ProductItemFunction; itemFunc.onClickByShowCAD = OnItemClick; }
protected override void ItemAddListion(UGUIItemFunction func) { base.ItemAddListion(func); GenerateOfferItemFunc itemFunc = func as GenerateOfferItemFunc; itemFunc.deleteFun = DeleFunc; itemFunc.selectDeleteFunc = SelectDelete; itemFunc.deleteTween = DeleteTween; itemFunc.cancelDeleteFunc = CancelDelete; }
protected override void ItemAddListion(UGUIItemFunction func) { base.ItemAddListion(func); MaterailImageItemFunc itemfun = func as MaterailImageItemFunc; itemfun.deleFun = DeleFun; itemfun.deleFollowMouse = FollowMouse; itemfun.deleSetDraggedPosition = SetDraggedPosition; itemfun.deleSetDraggingIcon = SetDraggingIcon; itemfun.deleEndDragCopy = EndDragCopy; }
// 触发添加按钮 // 移除相机 视图 protected override void ItemAddListion(UGUIItemFunction func) { base.ItemAddListion(func); CamereViewItemFunc itemfun = func as CamereViewItemFunc; itemfun.deleFun = DeleFun; //itemfun.deleFollowMouse = FollowMouse; //itemfun.deleSetDraggedPosition = SetDraggedPosition; //itemfun.deleSetDraggingIcon = SetDraggingIcon; //itemfun.deleEndDragCopy = EndDragCopy; }
/// <summary> /// 刷新 /// </summary> /// <param name="data">data = null 表示没有增加数据 </param> /// <param name="restPos"> restPos = false 表示不用重置位置</param> /// <param name="isChange">isChange = false 表示不需要刷新</param> public virtual void RefreshDisplay(List <ItemData> data = null, bool restPos = false, bool isChange = false) { if (actived == false) { return; } foreach (UGUIItemFunction item in itemDic.Values) { item.gameObject.SetActive(false); skinList.Push(item.gameObject); } itemDic.Clear(); if (restPos == true) { ResetPostion(); } if (data != null) { this.Msgs = data; } if (data != null || isChange) { SetContentSize(this.Msgs.Count); } for (int i = 0; i < this.Msgs.Count; i++) { if ((i < CurrentIndex - UpperLimitIndex) && (CurrentIndex > LowerLimitIndex) && !isChange) { return; } skinClone = GetInstance(); skinClone.transform.SetParent(ContentRectTrans); skinClone.transform.localPosition = GetLoaclPosByIndex(i); skinClone.transform.localScale = Vector3.one; skinClone.GetComponent <RectTransform>().SetSiblingIndex(i); UGUIItemFunction func = skinClone.GetComponent <UGUIItemFunction>(); func.scroRect = ScroRect; func.data = this.Msgs[i]; func.index = i; itemDic.Add(i, func); ItemAddListion(func); ItemChildGameObject(skinClone); } }
protected override void ItemAddListion(UGUIItemFunction func) { base.ItemAddListion(func); }
protected override void ItemAddListion(UGUIItemFunction func) { base.ItemAddListion(func); CreateOfferItemFunc itemFunc = func as CreateOfferItemFunc; //itemFunc.deleteFun = DeleFunc; }
//protected virtual void AddItem(GameObject addSkin,int count =1) //{ // AddItemPerfab += count; // ResetPostion(); // SetContentSize(count); // GameObject addCloneSkin = GameObject.Instantiate(addSkin); // addCloneSkin.transform.SetParent(ContentRectTrans); // addCloneSkin.transform.localPosition = GetLoaclPosByIndex(0); // addCloneSkin.transform.localScale = Vector3.one; // addCloneSkin.SetActive(true); //} // 给每个Item 添加事件 protected virtual void ItemAddListion(UGUIItemFunction func) { }
protected override void ItemAddListion(UGUIItemFunction func) { LobbyRoomItemFunction itemFunc = func as LobbyRoomItemFunction; itemFunc.enterRoomAction = OnEnterRoom; }
public override void RefreshDisplay(List <object> data = null, bool restPos = false, bool isChange = false) { if (data.Count == 0) { return; } foreach (UGUIItemFunction item in itemDic.Values) { item.gameObject.SetActive(false); //skinList.Push(item.gameObject); } itemDic.Clear(); List <object> playerData = new List <object>(); foreach (var item in data) { Player player = item as Player; if (player == null) { continue; } if (player.CustomProperties["Team"].Equals("redTeam")) { playerData.Add(item); } } if (actived == false) { return; } if (restPos == true) { ResetPostion(); } if (playerData != null) { this.Msgs = playerData; } if (playerData != null || isChange) { SetContentSize(this.Msgs.Count); } for (int i = 0; i < this.Msgs.Count; i++) { if ((i < CurrentIndex - UpperLimitIndex) && (CurrentIndex > LowerLimitIndex) && !isChange) { return; } Player player = (Player)Msgs[i]; var index = (int)player.CustomProperties["TeamNum"]; skinClone = Instance(i); skinClone.transform.SetParent(ContentRectTrans); skinClone.transform.localPosition = GetLoaclPosByIndex(i); skinClone.transform.localScale = Vector3.one; skinClone.GetComponent <RectTransform>().SetSiblingIndex(i); UGUIItemFunction func = skinClone.GetComponent <UGUIItemFunction>(); func.scroRect = ScroRect; func.data = this.Msgs[i]; func.index = i; itemDic.Add(i, func); ItemAddListion(func); ItemChildGameObject(skinClone); } }
protected override void ItemAddListion(UGUIItemFunction func) { base.ItemAddListion(func); FullImageItemFunc itemFunc = func as FullImageItemFunc; //itemFunc.onRestFiexdPos = ResetFixedPos; }