protected void setupDragIcon(CustomizerGestureModel currentGesture)
 {
     dragContainer.SetImage(Sprite.Create(dragTexture, new Rect(0f, 0f, dragTexture.width, dragTexture.height), default(Vector2)));
     (dragContainer.transform as RectTransform).anchoredPosition = currentGesture.TouchDownStartPos;
     setRelativeIconPostion(currentGesture.TouchDownStartPos);
     dragContainer.Show();
 }
示例#2
0
 private void handoffToDragContainer(PointerEventData eventData)
 {
     if (!didDropItem)
     {
         if (sceneManipulationService.IsLayoutAtMaxItemLimit())
         {
             Service.Get <EventDispatcher>().DispatchEvent(default(IglooUIEvents.MaxItemsLimitReached));
             SetItemCount(count + 1, showCountIfZero, tintIfZero);
             EventManager.Instance.PostEvent(dragEndEventName, dragEndEventType, base.gameObject);
         }
         else
         {
             RemoveBreadcrumb();
             EventManager.Instance.PostEvent(dragEventName, dragEventType, base.gameObject);
             dragContainer.transform.position = eventData.position;
             dragContainer.SetImage(GetImage());
             ShowDragContainer();
             SetItemCount(count - 1, showCountIfZero, tintIfZero);
         }
         didDropItem = true;
     }
 }