Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: UltraTM on September 13, 2014, 04:08:16 AM
-
Hi,
1. How can i make that when i have 2 Textinput fields one is Username and one is password. So when im in the password field i want to hit enter to also press the Login Button.
I attached an Keybinding to the Login Button. But it doesnt work when im in the input field. Always need to click somewhere else first that im able to press Enter for Login.
2. How can i save the username which is typed in. What i mean is that always the las text which was typed in the Username Textfield appears?
Would be nice to now cause im not really a programmer at all. Would be so nice if someone could help there :)
Thank you very much . And i love NGUI better then all other GUIs out there. Makes so much fun to work with it
-
Can someone please help me :(
-
1. You get an On Submit notification in input fields. Inside this callback do something -- such as clicking your button. You can choose this function right in inspector. Key bindings won't trigger from input fields. All key bindings are inactive while typing text in an input field.
2. It's done automatically if you specify a "Save As" value.
-
1. Got it thanks now i understand that :)
2. What should i insert in Saved As or is there something else needed? This i dont understand right. I used Username but still nothing saved.
-
It's a key that is used to save the value. If you use "Username" it will save it under that key. Note that it's the value of the input field that gets saved. So if you use "Username" as the "Save As" value, and type "Hello world" in the input field then hit Enter to submit it, the "Hello world" will get saved. Then if you stop the game and hit Play again, the input field's value will be automatically set to "Hello world" until you change it to something else.
-
Seems good also played with notify password and all to save both.
But can i also make an remember me checkbox to save both only when this is checked?
that would be awesome if you could show me that :)
-
In the checkbox's On Change notification, set the UIInput's "save as" value to either something, or nothing. If it's nothing, it won't save.