Author Topic: 2.7.0 resetting UIInput  (Read 3127 times)

Tripwire

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 163
    • View Profile
2.7.0 resetting UIInput
« 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 :(


OnlineCop

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 51
    • View Profile
Re: 2.7.0 resetting UIInput
« Reply #1 on: October 03, 2013, 09:20:45 AM »
What happens when you set the text to an empty value?
  1. inputLabel.text="";

Tripwire

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 163
    • View Profile
Re: 2.7.0 resetting UIInput
« Reply #2 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.

Tripwire

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 163
    • View Profile
Re: 2.7.0 resetting UIInput
« Reply #3 on: October 04, 2013, 02:18:18 AM »
pretty please :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 2.7.0 resetting UIInput
« Reply #4 on: October 04, 2013, 02:34:11 AM »
Set it to null.

Tripwire

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 163
    • View Profile
Re: 2.7.0 resetting UIInput
« Reply #5 on: October 08, 2013, 09:17:39 AM »
Thx that worked :)

Tripwire

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 0
  • Posts: 163
    • View Profile
Re: 2.7.0 resetting UIInput
« Reply #6 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 :(

Darkmax

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 93
    • View Profile
Re: 2.7.0 resetting UIInput
« Reply #7 on: October 15, 2013, 03:10:07 PM »
I'm also having this issue for password input, did you resolve this issue?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 2.7.0 resetting UIInput
« Reply #8 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.

Darkmax

  • Jr. Member
  • **
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 93
    • View Profile
Re: 2.7.0 resetting UIInput
« Reply #9 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