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; } } }
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(); }
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); }
public static void Clear() { InputEvent = null; InputCaret.Hide(); }
internal override void OnLostFocus(UserAction eventCall) { Style = 0; InputCaret.Hide(); Focus = false; }
internal override void OnClick(UserAction action) { Style = 0; InputCaret.Hide(); }