public void Stop() { if (pointerId != PanelManager.NON_EXISTING_TOUCH) { if (!m_panel.IsDocked) { ((UnanchoredPanelGroup)m_panel.Group).RestrictPanelToBounds(m_panel); } pointerId = PanelManager.NON_EXISTING_TOUCH; #if ENABLE_CURSOR_MANAGEMENT PanelCursorHandler.OnEndResize(); #endif } }
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 (!m_panel.CanResizeInDirection(m_direction)) { eventData.pointerDrag = null; return; } pointerId = eventData.pointerId; secondDirection = GetSecondDirection(eventData.pressPosition); #if ENABLE_CURSOR_MANAGEMENT PanelCursorHandler.OnBeginResize(m_direction, secondDirection); #endif }
public void OnEndDrag(PointerEventData eventData) { if (eventData.pointerId != pointerId) { return; } if (!m_panel.IsDocked) { ((UnanchoredPanelGroup)m_panel.Group).RestrictPanelToBounds(m_panel); } pointerId = PanelManager.NON_EXISTING_TOUCH; #if ENABLE_CURSOR_MANAGEMENT PanelCursorHandler.OnEndResize(); #endif }
public void OnPointerExit(PointerEventData eventData) { PanelCursorHandler.OnPointerExit(this); }
public void OnPointerEnter(PointerEventData eventData) { PanelCursorHandler.OnPointerEnter(this, eventData); }
private void Awake() { instance = this; }