Example #1
0
        public void Stop()
        {
            if (pointerId != PanelManager.NON_EXISTING_TOUCH)
            {
                if (!panel.IsDocked)
                {
                    ((UnanchoredPanelGroup)panel.Group).RestrictPanelToBounds(panel);
                }

                pointerId = PanelManager.NON_EXISTING_TOUCH;

#if ENABLE_CURSOR_MANAGEMENT
                PanelCursorHandler.OnEndResize();
#endif
            }
        }
Example #2
0
        public void OnBeginDrag(PointerEventData eventData)
        {
            // Cancel drag event if panel is already being resized by another pointer
            // or panel is anchored to a fixed anchor in that direction
            if (!panel.CanResizeInDirection(direction))
            {
                eventData.pointerDrag = null;
                return;
            }

            pointerId       = eventData.pointerId;
            secondDirection = GetSecondDirection(eventData.pressPosition);

#if ENABLE_CURSOR_MANAGEMENT
            PanelCursorHandler.OnBeginResize(direction, secondDirection);
#endif
        }
Example #3
0
        public void OnEndDrag(PointerEventData eventData)
        {
            if (eventData.pointerId != pointerId)
            {
                return;
            }

            if (!panel.IsDocked)
            {
                ((UnanchoredPanelGroup)panel.Group).RestrictPanelToBounds(panel);
            }

            pointerId = PanelManager.NON_EXISTING_TOUCH;

#if ENABLE_CURSOR_MANAGEMENT
            PanelCursorHandler.OnEndResize();
#endif
        }
Example #4
0
 public void OnPointerExit(PointerEventData eventData)
 {
     PanelCursorHandler.OnPointerExit(this);
 }
Example #5
0
 public void OnPointerEnter(PointerEventData eventData)
 {
     PanelCursorHandler.OnPointerEnter(this, eventData);
 }
Example #6
0
 private void Awake()
 {
     instance = this;
 }