public override void OnMouseDown(UserAction action) { Focus = true; if (TextCom != null) { EndPress = StartPress = GetPressIndex(action, Vector2.zero); InputCaret.SetParent(TextCom.transform); InputCaret.Active(); ShowChanged = true; } base.OnMouseDown(action); }
internal override void OnClick(UserAction action) { if (InputEvent != this) { InputEvent = this; bool pass = InputEvent.contentType == ContentType.Password ? true : false; Keyboard.OnInput(Text.FullString, InputEvent.touchType, InputEvent.multiLine, pass, CharacterLimit); InputCaret.SetParent(Context.transform); pressOffset = StartPress.Offset; Editing = true; } else if (!Keyboard.active) { bool pass = InputEvent.contentType == ContentType.Password ? true : false; Keyboard.OnInput(Text.FullString, InputEvent.touchType, InputEvent.multiLine, pass, CharacterLimit); } Style = 1; }
void OnClick(EventCallBack eventCall, UserAction action) { TextInput input = eventCall as TextInput; if (input == null) { return; } InputEvent = input; textInfo.startSelect = GetPressIndex(textInfo, this, action, ref textInfo.startDock); textInfo.endSelect = -1; textInfo.CaretStyle = 1; ChangePoint(textInfo); bool pass = InputEvent.contentType == ContentType.Password ? true : false; Keyboard.OnInput(textInfo.text, InputEvent.touchType, InputEvent.multiLine, pass, CharacterLimit); InputCaret.SetParent(Target); InputCaret.ChangeCaret(textInfo); }
void OnClick(EventCallBack eventCall, UserAction action) { TextInput input = eventCall as TextInput; if (input == null) { return; } InputEvent = input; textInfo.startSelect = GetPressIndex(textInfo, this, action, ref textInfo.startDock) + textInfo.StartIndex; textInfo.endSelect = -1; textInfo.CaretStyle = 1; selectChanged = true; ThreadMission.InvokeToMain((o) => { bool pass = InputEvent.contentType == ContentType.Password ? true : false; Keyboard.OnInput(textInfo.text, InputEvent.touchType, InputEvent.multiLine, pass, CharacterLimit); InputCaret.SetParent(Context.Context); InputCaret.ChangeCaret(textInfo); }, null); }