protected internal override void ExecuteDefaultActionAtTarget(EventBase evt) { base.ExecuteDefaultActionAtTarget(evt); if ((evt as MouseDownEvent)?.button == (int)MouseButton.LeftMouse) { OnMouseDown(evt as MouseDownEvent); } else if ((evt as KeyDownEvent)?.character == '\n') { OnKeyboardEnter(); } else if (evt.GetEventTypeId() == DragUpdatedEvent.TypeId()) { OnDragUpdated(evt); } else if (evt.GetEventTypeId() == DragPerformEvent.TypeId()) { OnDragPerform(evt); } else if (evt.GetEventTypeId() == DragLeaveEvent.TypeId()) { OnDragLeave(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { if (evt.GetEventTypeId() == GeometryChangedEvent.TypeId()) { if (m_Attacher != null) { PerformTipLayout(); } } else if (evt.GetEventTypeId() == DetachFromPanelEvent.TypeId()) { if (m_Attacher != null) { m_Attacher.Detach(); m_Attacher = null; } } else if (evt.GetEventTypeId() == MouseEnterEvent.TypeId()) { //we make sure we sit on top of whatever siblings we have BringToFront(); ShowText(); } else if (evt.GetEventTypeId() == MouseLeaveEvent.TypeId()) { HideText(); } base.ExecuteDefaultAction(evt); }
protected internal override void ExecuteDefaultAction(EventBase evt) { if (evt.GetEventTypeId() == EventBase <PostLayoutEvent> .TypeId()) { if (this.m_Attacher != null) { this.PerformTipLayout(); } } else if (evt.GetEventTypeId() == EventBase <DetachFromPanelEvent> .TypeId()) { if (this.m_Attacher != null) { this.m_Attacher.Detach(); this.m_Attacher = null; } } else if (evt.GetEventTypeId() == EventBase <MouseEnterEvent> .TypeId()) { this.ShowText(); } else if (evt.GetEventTypeId() == EventBase <MouseLeaveEvent> .TypeId()) { this.HideText(); } base.ExecuteDefaultAction(evt); }
protected internal override void ExecuteDefaultAction(EventBase evt) { if (evt.GetEventTypeId() == PostLayoutEvent.TypeId()) { if (m_Attacher != null) { PerformTipLayout(); } } else if (evt.GetEventTypeId() == DetachFromPanelEvent.TypeId()) { if (m_Attacher != null) { m_Attacher.Detach(); m_Attacher = null; } } else if (evt.GetEventTypeId() == MouseEnterEvent.TypeId()) { ShowText(); } else if (evt.GetEventTypeId() == MouseLeaveEvent.TypeId()) { HideText(); } base.ExecuteDefaultAction(evt); }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (m_ConnectorBox == null || m_ConnectorBoxCap == null) { return; } if (evt.GetEventTypeId() == MouseEnterEvent.TypeId()) { m_ConnectorBoxCap.style.backgroundColor = portColor; } else if (evt.GetEventTypeId() == MouseLeaveEvent.TypeId()) { UpdateCapColor(); } else if (evt.GetEventTypeId() == MouseUpEvent.TypeId()) { // When an edge connect ends, we need to clear out the hover states var mouseUp = (MouseUpEvent)evt; if (!layout.Contains(mouseUp.localMousePosition)) { UpdateCapColor(); } } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == EventBase <AttachToPanelEvent> .TypeId()) { this.AddWatch(); } else if (evt.GetEventTypeId() == EventBase <DetachFromPanelEvent> .TypeId()) { this.RemoveWatch(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == EventBase <MouseDownEvent> .TypeId()) { this.OnCurveClick(); } else if (evt.GetEventTypeId() == EventBase <DetachFromPanelEvent> .TypeId()) { this.OnDetach(); } }
public virtual void ExecuteDefaultAction(EventBase evt) { if (evt.GetEventTypeId() == FocusEvent.TypeId()) { editorEngine.OnFocus(); } else if (evt.GetEventTypeId() == BlurEvent.TypeId()) { editorEngine.OnLostFocus(); editorEngine.SelectNone(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == FocusEvent.TypeId()) { m_SetKbControl = true; } if (evt.GetEventTypeId() == BlurEvent.TypeId()) { m_ResetKbControl = true; } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == FocusEvent.TypeId()) { m_SetKbControl = true; // Make sure the inner IMGUIContainer is receiving the focus m_ColorField.Focus(); } if (evt.GetEventTypeId() == BlurEvent.TypeId()) { m_ResetKbControl = true; } }
public virtual void ExecuteDefaultAction(EventBase evt) { if (evt.GetEventTypeId() == FocusEvent.TypeId()) { editorEngine.OnFocus(); // Make sure to select all text, OnFocus() does not call SelectAll for multiline text field. // However, in IMGUI it will be call later by the OnMouseUp event. editorEngine.SelectAll(); } else if (evt.GetEventTypeId() == BlurEvent.TypeId()) { editorEngine.OnLostFocus(); editorEngine.SelectNone(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == EventBase <MouseDownEvent> .TypeId()) { this.OnMouseDown(); } else if (evt.GetEventTypeId() == EventBase <IMGUIEvent> .TypeId()) { this.OnIMGUI(evt); } else if (evt.GetEventTypeId() == EventBase <MouseLeaveEvent> .TypeId()) { this.OnMouseLeave(); } }
protected internal override void ExecuteDefaultActionAtTarget(EventBase evt) { if (evt.GetEventTypeId() == KeyDownEvent.TypeId()) { m_ColorField.HandleEvent(evt); } }
void OnMouseHover(EventBase evt) { VFXView view = GetFirstAncestorOfType <VFXView>(); if (view == null) { return; } VFXBlackboard blackboard = view.blackboard; if (blackboard == null) { return; } VFXBlackboardRow row = blackboard.GetRowFromController(controller.parentController); if (row == null) { return; } if (evt.GetEventTypeId() == MouseEnterEvent.TypeId()) { row.AddToClassList("hovered"); } else { row.RemoveFromClassList("hovered"); } }
protected internal override void ExecuteDefaultActionAtTarget(EventBase evt) { base.ExecuteDefaultActionAtTarget(evt); if (evt.GetEventTypeId() == MouseDownEvent.TypeId()) { OnMouseDown(); } else if (evt.GetEventTypeId() == IMGUIEvent.TypeId()) { OnIMGUI(evt); } else if (evt.GetEventTypeId() == MouseLeaveEvent.TypeId()) { OnMouseLeave(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if ((evt as MouseDownEvent)?.button == (int)MouseButton.LeftMouse || (evt as KeyDownEvent)?.character == '\n') { ShowGradientPicker(); } else if (evt.GetEventTypeId() == DetachFromPanelEvent.TypeId()) { OnDetach(); } else if (evt.GetEventTypeId() == AttachToPanelEvent.TypeId()) { OnAttach(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == MouseDownEvent.TypeId()) { OnClick(); } else if (evt.GetEventTypeId() == DetachFromPanelEvent.TypeId()) { OnDetach(); } else if (evt.GetEventTypeId() == AttachToPanelEvent.TypeId()) { OnAttach(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if ((evt as MouseDownEvent)?.button == (int)MouseButton.LeftMouse || (evt as KeyDownEvent)?.character == '\n') { ShowCurveEditor(); } else if (evt.GetEventTypeId() == DetachFromPanelEvent.TypeId()) { OnDetach(); } if (evt.GetEventTypeId() == GeometryChangedEvent.TypeId()) { m_TextureDirty = true; } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == GeometryChangedEvent.TypeId()) { UpdateSeparators(); } else if (evt.GetEventTypeId() == DetachFromPanelEvent.TypeId()) { graphView = null; } else if (evt.GetEventTypeId() == AttachToPanelEvent.TypeId()) { graphView = GetFirstAncestorOfType <GraphView>(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == EventBase <BlurEvent> .TypeId()) { this.UpdateValueFromText(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == EventBase <FocusEvent> .TypeId()) { this.m_SetKbControl = true; } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == EventBase <FocusEvent> .TypeId()) { this.m_ObjectFieldDisplay.Focus(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == GeometryChangedEvent.TypeId()) { UpdateSeparators(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == MouseDownEvent.TypeId()) { OnMouseDown(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == DetachFromPanelEvent.TypeId()) { OnDetach(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); // Focus first field if any if (evt.GetEventTypeId() == FocusEvent.TypeId() && m_Fields.Count > 0) { m_Fields[0].Focus(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); // Focus first field if any if (evt.GetEventTypeId() == FocusEvent.TypeId()) { m_PositionField.Focus(); } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); // Delegate focus to the control if (evt.GetEventTypeId() == FocusEvent.TypeId()) { m_Control.Focus(); } }
protected internal override void ExecuteDefaultActionAtTarget(EventBase evt) { base.ExecuteDefaultActionAtTarget(evt); bool hasChanged = false; if (evt.GetEventTypeId() == KeyDownEvent.TypeId()) { KeyDownEvent kde = evt as KeyDownEvent; if (kde.character == '\n') { UpdateValueFromText(); } else { hasChanged = true; } } else if (evt.GetEventTypeId() == ExecuteCommandEvent.TypeId()) { ExecuteCommandEvent commandEvt = evt as ExecuteCommandEvent; string cmdName = commandEvt.commandName; if (cmdName == EventCommandNames.Paste || cmdName == EventCommandNames.Cut) { hasChanged = true; } } if (!isDelayed && hasChanged) { // Prevent text from changing when the value change // This allow expression (2+2) or string like 00123 to remain as typed in the TextField until enter is pressed m_UpdateTextFromValue = false; try { UpdateValueFromText(); } finally { m_UpdateTextFromValue = true; } } }
protected internal override void ExecuteDefaultActionAtTarget(EventBase evt) { base.ExecuteDefaultActionAtTarget(evt); if (((evt as MouseDownEvent)?.button == (int)MouseButton.LeftMouse) || ((evt.GetEventTypeId() == KeyDownEvent.TypeId()) && ((evt as KeyDownEvent)?.character == '\n') || ((evt as KeyDownEvent)?.character == ' '))) { ShowMenu(); evt.StopPropagation(); } }