Exemplo n.º 1
0
            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);
                    }
                }
            }
Exemplo n.º 2
0
        protected internal override void ExecuteDefaultAction(EventBase evt)
        {
            base.ExecuteDefaultAction(evt);

            if (evt.GetEventTypeId() == BlurEvent.TypeId())
            {
                UpdateValueFromText();
            }
        }
Exemplo n.º 3
0
 public virtual void ExecuteDefaultAction(EventBase evt)
 {
     if (evt.GetEventTypeId() == FocusEvent.TypeId())
     {
         editorEngine.OnFocus();
     }
     else if (evt.GetEventTypeId() == BlurEvent.TypeId())
     {
         editorEngine.OnLostFocus();
         editorEngine.SelectNone();
     }
 }
Exemplo n.º 4
0
        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;
            }
        }
Exemplo n.º 5
0
        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();
            }
        }
Exemplo n.º 6
0
        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;
            }
        }
Exemplo n.º 7
0
        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();
                }
            }
        }
Exemplo n.º 8
0
        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();
            }
        }
Exemplo n.º 9
0
            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();
                    }
                }
            }