Ejemplo n.º 1
0
        internal override void Update()
        {
            switch (Style)
            {
            case 0:
                InputCaret.Hide();
                break;

            case 2:
                if (ShowChanged)
                {
                    InputCaret.Active();
                    ShowChanged = false;
                    List <HVertex> hs   = new List <HVertex>();
                    List <int>     tris = new List <int>();
                    GetSelectArea(SelectionColor, tris, hs);
                    InputCaret.ChangeCaret(hs.ToArray(), tris.ToArray());
                }
                break;
            }
            if (Focus)
            {
                if (Keyboard.GetKeyDown(KeyCode.C) & Keyboard.GetKey(KeyCode.LeftControl))
                {
                    GUIUtility.systemCopyBuffer = GetSelectString();
                }
                if (Keyboard.GetKeyDown(KeyCode.A) & Keyboard.GetKey(KeyCode.LeftControl))
                {
                    SelectAll();
                    ShowChanged = true;
                }
            }
        }
Ejemplo n.º 2
0
        internal override void OnLostFocus(UserAction action)
        {
            if (this == InputEvent)
            {
                if (InputEvent.OnDone != null)
                {
                    InputEvent.OnDone(InputEvent);
                }
                InputEvent = null;
            }
            Editing = false;
            SetShowText();

            InputCaret.Hide();
            Keyboard.EndInput();
        }
Ejemplo n.º 3
0
        void OnLostFocus(EventCallBack eventCall, UserAction action)
        {
            TextInput text = eventCall as TextInput;

            if (text == InputEvent)
            {
                if (InputEvent.OnDone != null)
                {
                    InputEvent.OnDone(InputEvent);
                }
                InputEvent = null;
            }
            Editing = false;
            SetShowText();
            ThreadMission.InvokeToMain((o) => {
                Keyboard.EndInput();
                InputCaret.Hide();
            }, null);
        }
Ejemplo n.º 4
0
 public static void Clear()
 {
     InputEvent = null;
     InputCaret.Hide();
 }
Ejemplo n.º 5
0
 internal override void OnLostFocus(UserAction eventCall)
 {
     Style = 0;
     InputCaret.Hide();
     Focus = false;
 }
Ejemplo n.º 6
0
 internal override void OnClick(UserAction action)
 {
     Style = 0;
     InputCaret.Hide();
 }