Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Tripwire on October 03, 2013, 08:00:17 AM

Title: 2.7.0 resetting UIInput
Post by: Tripwire on October 03, 2013, 08:00:17 AM
Hi,

How do i reset the UIInput to it's default settings when used? My input label has a default text, and when tapped this default text is removed and the user can type it's name. But when I return to the UIInput for the 2nd user creation the default text is gone and the text the first user typed is still there. I tried the following:

  1. inputLabel.text = defaultInputText    
        (which is a string var with the default text)

but then the color isn't grey (the same as the default text when never typed in the UIInput). So next step was:
  1. inputLabel.color = Color.grey;

That works but now when the 2nd user taps on the UIInput field it doesn't clear it, instead the labeltext is the same as the defaulttext so you have to backspace the whole text :(

Title: Re: 2.7.0 resetting UIInput
Post by: OnlineCop on October 03, 2013, 09:20:45 AM
What happens when you set the text to an empty value?
  1. inputLabel.text="";
Title: Re: 2.7.0 resetting UIInput
Post by: Tripwire on October 03, 2013, 09:24:30 AM
What happens when you set the text to an empty value?
  1. inputLabel.text="";

Thx for the reply!
When I set
  1. inputLabel.text = ""
the inpulabel field is empty the 2nd time i'm creating a user. So the default text isn't shown.
Title: Re: 2.7.0 resetting UIInput
Post by: Tripwire on October 04, 2013, 02:18:18 AM
pretty please :)
Title: Re: 2.7.0 resetting UIInput
Post by: ArenMook on October 04, 2013, 02:34:11 AM
Set it to null.
Title: Re: 2.7.0 resetting UIInput
Post by: Tripwire on October 08, 2013, 09:17:39 AM
Thx that worked :)
Title: Re: 2.7.0 resetting UIInput
Post by: Tripwire on October 14, 2013, 06:18:45 PM
Ok so it worked for normal inputlabels but when resetting a password label, when resetted it sets the label to password so only *** are shown when resetting :(
Title: Re: 2.7.0 resetting UIInput
Post by: Darkmax on October 15, 2013, 03:10:07 PM
I'm also having this issue for password input, did you resolve this issue?
Title: Re: 2.7.0 resetting UIInput
Post by: ArenMook on October 16, 2013, 02:24:52 AM
Current Pro version of NGUI doesn't have a password option on labels anymore, and the input field has been rewritten, so I'd suggest just moving on and seeing if the issue was resolved once the update is out.
Title: Re: 2.7.0 resetting UIInput
Post by: Darkmax on October 16, 2013, 09:17:38 AM
mm I don't have the pro version, I have the standard version from the unity store, I will have to wait when is uploaded on the unity store