protected override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt == null) { return; } if (evt.eventTypeId == BlurEvent.TypeId()) { if (string.IsNullOrEmpty(text)) { // Make sure that empty field gets the default value textValueFieldParent.value = default(TValueType); } else { UpdateValueFromText(); } } else if (evt.eventTypeId == FocusEvent.TypeId()) { if (textValueFieldParent.showMixedValue) { textValueFieldParent.value = default(TValueType); } } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == BlurEvent.TypeId()) { UpdateValueFromText(); } }
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; } }
public virtual void ExecuteDefaultAction(EventBase evt) { if (evt.eventTypeId == 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.eventTypeId == BlurEvent.TypeId()) { editorEngine.OnLostFocus(); editorEngine.SelectNone(); } }
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; } }
protected internal override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt.GetEventTypeId() == BlurEvent.TypeId()) { if (string.IsNullOrEmpty(text)) { // Make sure that empty field gets the default value value = default(T); } else { UpdateValueFromText(); } } }
public virtual void ExecuteDefaultAction(EventBase evt) { if (evt.eventTypeId == FocusEvent.TypeId()) { editorEngine.OnFocus(); // Make sure to select all text, OnFocus() does not call SelectAll for multiline text field. // If focused from the mouse, it will be called later by the OnMouseUp event. // This is needed when focus is obtained through a keyboard event (i.e. Tab). editorEngine.SelectAll(); } else if (evt.eventTypeId == BlurEvent.TypeId()) { editorEngine.OnLostFocus(); editorEngine.SelectNone(); } }
protected override void ExecuteDefaultAction(EventBase evt) { base.ExecuteDefaultAction(evt); if (evt == null) { return; } if (evt.eventTypeId == BlurEvent.TypeId()) { if (string.IsNullOrEmpty(text)) { // Make sure that empty field gets the default value hash128Field.value = new Hash128(); } else { UpdateValueFromText(); } } }