private void ProcessDownEvent(EventBase evt) { // Make sure no other elements can capture the mouse! evt.StopPropagation(); dragging = true; startValue = m_DrivenField.value; m_DrivenField.StartDragging(); EditorGUIUtility.SetWantsMouseJumping(1); }
private void ProcessDownEvent(EventBase evt) { // Make sure no other elements can capture the mouse! evt.StopPropagation(); dragging = true; m_DragElement.RegisterCallback <PointerMoveEvent>(UpdateValueOnPointerMove); startValue = m_DrivenField.value; m_DrivenField.StartDragging(); (m_DragElement.panel as BaseVisualElementPanel)?.uiElementsBridge?.SetWantsMouseJumping(1); }
void UpdateValueOnMouseDown(MouseDownEvent evt) { if (evt.button == 0 && (m_DragHotZone.width < 0 || m_DragHotZone.height < 0 || m_DragHotZone.Contains(m_DragElement.WorldToLocal(evt.mousePosition)))) { m_DragElement.CaptureMouse(); // Make sure no other elements can capture the mouse! evt.StopPropagation(); dragging = true; startValue = m_DrivenField.value; m_DrivenField.StartDragging(); EditorGUIUtility.SetWantsMouseJumping(1); } }