Skip to main content
added 554 characters in body
Source Link
Justin808
  • 213
  • 3
  • 9

How do I reset the value of a NGUI UIInput control that marked Is Password. If I set .text to "" I still see a bunch of ************** rather than the .defaultText.

Basically if the user types the wrong password during login, I want to clear the field and have is display the default text again.

Update

If I click into the field and back out, the default text shows, but until I do that I get the **********.

Code:

// Show the Create dialog
public void ShowCreate() {
    panelWait.gameObject.SetActive(false);
    panelLogin.gameObject.SetActive(false);
    panelCreate.gameObject.SetActive(true);

    username = loginUsername.text;
    createUsername.text = username;
    createPasswordA.text = "";
    createPasswordB.text = "";
}

Image: enter image description here

How do I reset the value of a NGUI UIInput control that marked Is Password. If I set .text to "" I still see a bunch of **** rather than the .defaultText.

Basically if the user types the wrong password during login, I want to clear the field and have is display the default text again.

How do I reset the value of a NGUI UIInput control that marked Is Password. If I set .text to "" I still see a bunch of ********** rather than the .defaultText.

Basically if the user types the wrong password during login, I want to clear the field and have is display the default text again.

Update

If I click into the field and back out, the default text shows, but until I do that I get the **********.

Code:

// Show the Create dialog
public void ShowCreate() {
    panelWait.gameObject.SetActive(false);
    panelLogin.gameObject.SetActive(false);
    panelCreate.gameObject.SetActive(true);

    username = loginUsername.text;
    createUsername.text = username;
    createPasswordA.text = "";
    createPasswordB.text = "";
}

Image: enter image description here

edited title
Link
Tetrad
  • 30.1k
  • 12
  • 96
  • 143

NGUI UIInput - Reset value of password field

Source Link
Justin808
  • 213
  • 3
  • 9

NGUI UIInput - Reset value

How do I reset the value of a NGUI UIInput control that marked Is Password. If I set .text to "" I still see a bunch of **** rather than the .defaultText.

Basically if the user types the wrong password during login, I want to clear the field and have is display the default text again.