From: Kjetil Mehl Date: Sun, 21 Apr 2013 12:15:56 +0000 (+0200) Subject: Update display text immediately after password character or password X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=cf8949d91c1ed6ea9c7f2dbee9f882b281aad0c2;p=mikumikustudio%2Flibgdx-mikumikustudio.git Update display text immediately after password character or password mode has been enabled (issue 1397). --- diff --git a/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/TextField.java b/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/TextField.java index 8866c6cae..5bcf83955 100644 --- a/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/TextField.java +++ b/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/TextField.java @@ -379,8 +379,10 @@ public class TextField extends Widget { invalidateHierarchy(); } + /** Sets the password character for the text field. The character must be present in the {@link BitmapFont} */ public void setPasswordCharacter (char passwordCharacter) { this.passwordCharacter = passwordCharacter; + updateDisplayText(); } /** Returns the text field's style. Modifying the returned style may not have an effect until {@link #setStyle(TextFieldStyle)} @@ -758,6 +760,7 @@ public class TextField extends Widget { * no affect. */ public void setPasswordMode (boolean passwordMode) { this.passwordMode = passwordMode; + updateDisplayText(); } public void setBlinkTime (float blinkTime) {