コード例 #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);
                    }
                }
            }
コード例 #2
0
        protected internal override void ExecuteDefaultAction(EventBase evt)
        {
            base.ExecuteDefaultAction(evt);

            if (evt.GetEventTypeId() == BlurEvent.TypeId())
            {
                UpdateValueFromText();
            }
        }
コード例 #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();
     }
 }
コード例 #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;
            }
        }
コード例 #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();
            }
        }
コード例 #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;
            }
        }
コード例 #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();
                }
            }
        }
コード例 #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();
            }
        }
コード例 #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();
                    }
                }
            }