void OnMouseDownSubTitle(MouseDownEvent evt) { if (evt.clickCount == 2 && evt.button == (int)MouseButton.LeftMouse && m_CanEdit && controller != null) { StartEditingPath(); evt.PreventDefault(); } }
void OnMouseDownEvent(MouseDownEvent evt) { if (evt.clickCount == 2 && evt.button == (int)MouseButton.LeftMouse) { StartEditingPath(); evt.PreventDefault(); } }
private void OnMouseDownEvent(MouseDownEvent e) { if ((e.clickCount == 2) && e.button == (int)MouseButton.LeftMouse) { RenameGo(); e.PreventDefault(); } }
public static void OnEditEvent(MouseDownEvent evt, TextField edit) { if (evt.clickCount == 2 && evt.button == (int)MouseButton.LeftMouse) { ShowEditableText(edit); evt.PreventDefault(); } }
private void OnTitleLabelMouseDown(MouseDownEvent evt) { if (evt.clickCount == 2 && evt.button == (int)MouseButton.LeftMouse) { StartEditingName(); evt.PreventDefault(); } }
private void OnMouseDownEvent(MouseDownEvent e) { if ((e.clickCount == 2) && e.button == (int)MouseButton.LeftMouse) { OpenTextEditor(); e.PreventDefault(); } }
void OnTitleMouseDown(MouseDownEvent e) { if (e.clickCount == 2) { OnRename(); e.StopPropagation(); e.PreventDefault(); } }
void OnMouseDownEvent(MouseDownEvent e) { if ((e.clickCount == 2) && e.button == (int)MouseButton.LeftMouse && IsRenamable()) { OpenTextEditor(); e.PreventDefault(); e.StopImmediatePropagation(); } }
void OnContentsMouseDown(MouseDownEvent e) { if (e.clickCount == 2) { m_ContentsField.value = m_Contents.text; m_ContentsField.style.display = DisplayStyle.Flex; m_ContentsField.Q("unity-text-input").Focus(); e.StopPropagation(); e.PreventDefault(); } }
void OnContentsMouseDown(MouseDownEvent e) { if (e.button == (int)MouseButton.LeftMouse && e.clickCount == 2) { m_ContentsField.value = m_Contents.text; m_ContentsField.style.display = DisplayStyle.Flex; m_ContentsField.Q(TextField.textInputUssName).Focus(); e.StopPropagation(); e.PreventDefault(); } }
void OnMouseDownEventForRename(MouseDownEvent e) { if (e.clickCount != 2 || e.button != (int)MouseButton.LeftMouse || e.target == null) { return; } ActivateRenameElementMode(); e.PreventDefault(); }
void OnContentsMouseDown(MouseDownEvent e) { if (e.clickCount == 2) { m_ContentsField.value = m_Contents.text; m_ContentsField.visible = true; m_ContentsField.Q("unity-text-input").Focus(); e.StopPropagation(); e.PreventDefault(); } }
void OnContentsMouseDown(MouseDownEvent e) { if (e.button == (int)MouseButton.LeftMouse && e.clickCount == 2) { m_Content.style.display = DisplayStyle.None; m_ContentField.style.display = StyleKeyword.Null; m_ContentField.Q(TextField.textInputUssName).Focus(); m_ContentField.SelectAll(); e.StopPropagation(); e.PreventDefault(); } }
void OnTitleMouseDown(MouseDownEvent e) { if (e.button == (int)MouseButton.LeftMouse && e.clickCount == 2) { m_TitleField.RemoveFromClassList("empty"); m_Title.style.display = DisplayStyle.None; m_TitleField.style.display = StyleKeyword.Null; m_TitleField.Q(TextField.textInputUssName).Focus(); m_TitleField.SelectAll(); e.StopPropagation(); e.PreventDefault(); } }
void OnTitleMouseDown(MouseDownEvent e) { if (e.clickCount == 2) { m_TitleField.RemoveFromClassList("empty"); m_TitleField.value = m_Title.text; m_TitleField.style.display = DisplayStyle.Flex; UpdateTitleFieldRect(); m_Title.RegisterCallback <GeometryChangedEvent>(OnTitleRelayout); m_TitleField.Q("unity-text-input").Focus(); m_TitleField.SelectAll(); e.StopPropagation(); e.PreventDefault(); } }
void OnTitleMouseDown(MouseDownEvent e) { if (e.clickCount == 2) { m_TitleField.RemoveFromClassList("empty"); m_TitleField.value = m_Title.text; m_TitleField.visible = true; UpdateTitleFieldRect(); m_Title.RegisterCallback <GeometryChangedEvent>(OnTitleRelayout); m_TitleField.Focus(); m_TitleField.SelectAll(); e.StopPropagation(); e.PreventDefault(); } }
protected void OnMouseDown(MouseDownEvent e) { if (CanStartManipulation(e)) { VisualSplitter visualSplitter = target as VisualSplitter; FlexDirection flexDirection = visualSplitter.resolvedStyle.flexDirection; if (m_AffectedElements != null) { VisualElementListPool.Release(m_AffectedElements); } m_AffectedElements = visualSplitter.GetAffectedVisualElements(); var shouldUseEvent = false; for (int i = 0; i < m_AffectedElements.Count - 1; ++i) { VisualElement visualElement = m_AffectedElements[i]; Rect splitterRect = visualSplitter.GetSplitterRect(visualElement); if (splitterRect.Contains(e.localMousePosition)) { bool isReverse = flexDirection == FlexDirection.RowReverse || flexDirection == FlexDirection.ColumnReverse; if (isReverse) { m_ActiveVisualElementIndex = i + 1; m_NextVisualElementIndex = i; } else { m_ActiveVisualElementIndex = i; m_NextVisualElementIndex = i + 1; } shouldUseEvent = true; } } if (shouldUseEvent) { m_Active = true; target.CaptureMouse(); e.StopPropagation(); e.PreventDefault(); } } }
void OnTitleMouseDown(MouseDownEvent e) { if (e.button == (int)MouseButton.LeftMouse && e.clickCount == 2) { m_TitleField.RemoveFromClassList("empty"); m_TitleField.value = m_Title.text; m_TitleField.style.display = DisplayStyle.Flex; UpdateTitleFieldRect(); m_Title.RegisterCallback <GeometryChangedEvent>(OnTitleRelayout); m_TitleField.Q(TextField.textInputUssName).Focus(); m_TitleField.SelectAll(); e.StopPropagation(); e.PreventDefault(); } }
void OnMouseDown(MouseDownEvent evt) { if (s_CurrentlyActiveBuilderDragger != null && s_CurrentlyActiveBuilderDragger != this) { return; } var target = evt.currentTarget as VisualElement; if (m_WeStartedTheDrag && target.HasMouseCapture()) { evt.StopImmediatePropagation(); evt.PreventDefault(); return; } if (!CanStartManipulation(evt)) { return; } var stopEvent = StopEventOnMouseDown(evt); if (stopEvent) { evt.StopImmediatePropagation(); } if (target.HasMouseCapture()) { if (!stopEvent) { evt.StopImmediatePropagation(); } return; } s_CurrentlyActiveBuilderDragger = this; m_Start = evt.mousePosition; m_WeStartedTheDrag = true; target.CaptureMouse(); }