Support => NGUI 3 Support => Topic started by: KChandra on August 10, 2016, 11:11:07 AM
Title: UIInput - Password
Post by: KChandra on August 10, 2016, 11:11:07 AM
Hi!
Is there a way to disable copy pasting values in a UIInput if the Input Type is set to Password?
Title: Re: UIInput - Password
Post by: ArenMook on August 10, 2016, 11:24:03 AM
Yes. You can create a class derived from UIInput and overwrite the ProcessEvent function. The paste happens if the keycode is "c", on line 1072. You can check for that and exit out early if it's a password field.
Title: Re: UIInput - Password
Post by: KChandra on August 11, 2016, 02:27:22 AM
Ah cool! Thank you so much! :D
Title: Re: UIInput - Password
Post by: Fabien on July 10, 2017, 08:51:26 AM
Hi,
I had the same issue (and I will use the solution below), but I don't understand why it's not the default behaviour, it's very strange and uncommon that you can copy a "******" value.
Title: Re: UIInput - Password
Post by: ArenMook on July 15, 2017, 06:12:11 AM
Well, you're the one typing it -- you know what you're typing, so why not allow copy/paste? :P