Welcome,
Guest
. Please
login
or
register
.
January 16, 2026, 05:46:57 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UIInput - Password
« previous
next »
Print
Pages: [
1
]
Author
Topic: UIInput - Password (Read 9711 times)
KChandra
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 5
UIInput - Password
«
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?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: UIInput - Password
«
Reply #1 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.
public
override
ProcessEvent
(
Event
ev
)
{
if
(
ev
.
keyCode
==
KeyCode
.
C
&&
inputType
==
InputType
.
Password
)
return
;
base
.
ProcessEvent
(
ev
)
;
}
Logged
KChandra
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 5
Re: UIInput - Password
«
Reply #2 on:
August 11, 2016, 02:27:22 AM »
Ah cool! Thank you so much!
Logged
Fabien
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 3
Re: UIInput - Password
«
Reply #3 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.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: UIInput - Password
«
Reply #4 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?
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UIInput - Password