示例#1
0
 void UpdateValueOnMouseUp(MouseUpEvent evt)
 {
     if (dragging)
     {
         dragging = false;
         MouseCaptureController.ReleaseMouse();
         EditorGUIUtility.SetWantsMouseJumping(0);
         m_DrivenField.StopDragging();
     }
 }
 void UpdateValueOnMouseUp(MouseUpEvent evt)
 {
     if (dragging)
     {
         dragging = false;
         IPanel panel = (evt.target as VisualElement)?.panel;
         panel.ReleasePointer(PointerId.mousePointerId);
         EditorGUIUtility.SetWantsMouseJumping(0);
         m_DrivenField.StopDragging();
     }
 }
        private void ProcessUpEvent(EventBase evt, int pointerId)
        {
            if (dragging)
            {
                dragging = false;
                m_DragElement.ReleasePointer(pointerId);
                if (evt is IMouseEvent)
                {
                    m_DragElement.panel.ProcessPointerCapture(PointerId.mousePointerId);
                }

                EditorGUIUtility.SetWantsMouseJumping(0);
                m_DrivenField.StopDragging();
            }
        }
示例#4
0
        private void ProcessUpEvent(EventBase evt, int pointerId)
        {
            if (dragging)
            {
                dragging = false;
                m_DragElement.UnregisterCallback <PointerMoveEvent>(UpdateValueOnPointerMove);
                m_DragElement.ReleasePointer(pointerId);
                if (evt is IMouseEvent)
                {
                    m_DragElement.panel.ProcessPointerCapture(PointerId.mousePointerId);
                }

                (m_DragElement.panel as BaseVisualElementPanel)?.uiElementsBridge?.SetWantsMouseJumping(0);
                m_DrivenField.StopDragging();
            }
        }