How to remove / disable text field on keyboard when using UUnput NGUI?

I am using the UUnput NGUI class to receive text input from a user. when I start typing a text box on mobile devices. the keyboard appears, and there is another text box with the OK / Done button (as well as the type of keyboard accessories, if we are talking about the iPhone).

Can I turn off this text box that appears on the keyboard? Or is it not even possible, and I remove only the spaces?

From what I could find while searching for a while, a keyboard appears that handles the Unity class “TouchScreenKeyboard”. but according to the Unity Scripting link there is nothing that could hide the text box inside the keyboard.

Unity Scripting Link: TouchInputKeyboard

PS: - I can still put the input in the text box, just by entering the text in them, I just want the extra text box on the keyboard to be deleted.

To be more clear, I have added images explaining this.

This is the screen.

enter image description here

When I start typing in one of the text fields. The keyboard is as follows. as you can see that the text box just above the keyboard is not original.

enter image description here

+5
source share
3 answers

Dude ... are you kidding?

Have you tried checking the "Hide check box entry" checkbox in the Inspector view of this UIInput text box?

+3
source
private void OnGUI() { TouchScreenKeyboard.hideInput=true; } 
0
source

I don’t know why this is so, but I also had this problem, and the “hide input” checkbox for some reason does not seem to do anything else but change the keyboard text field from one line to several lines.

I did a bit of work and came across a quick guide that will enable this hidden input.

This fix is ​​Update () in UIInput.cs around 650

 else if (inputType == InputType.Password) { TouchScreenKeyboard.hideInput = true; kt = TouchScreenKeyboardType.Default; val = mValue; mSelectionStart = mSelectionEnd; } else { if(hideInput) { TouchScreenKeyboard.hideInput = true; } else { TouchScreenKeyboard.hideInput = false; } kt = (TouchScreenKeyboardType)((int)keyboardType); val = mValue; mSelectionStart = mSelectionEnd; } 

I added validation in the else statement

0
source

Source: https://habr.com/ru/post/1204534/


All Articles