OSDN Git Service

Update display text immediately after password character or password
authorKjetil Mehl <aspic@mehl.no>
Sun, 21 Apr 2013 12:15:56 +0000 (14:15 +0200)
committerKjetil Mehl <aspic@mehl.no>
Sun, 21 Apr 2013 12:15:56 +0000 (14:15 +0200)
mode has been enabled (issue 1397).

gdx/src/com/badlogic/gdx/scenes/scene2d/ui/TextField.java

index 8866c6c..5bcf839 100644 (file)
@@ -379,8 +379,10 @@ public class TextField extends Widget {
                invalidateHierarchy();\r
        }\r
 \r
+       /** Sets the password character for the text field. The character must be present in the {@link BitmapFont} */\r
        public void setPasswordCharacter (char passwordCharacter) {\r
                this.passwordCharacter = passwordCharacter;\r
+               updateDisplayText();\r
        }\r
 \r
        /** Returns the text field's style. Modifying the returned style may not have an effect until {@link #setStyle(TextFieldStyle)}\r
@@ -758,6 +760,7 @@ public class TextField extends Widget {
         * no affect. */\r
        public void setPasswordMode (boolean passwordMode) {\r
                this.passwordMode = passwordMode;\r
+               updateDisplayText();\r
        }\r
 \r
        public void setBlinkTime (float blinkTime) {\r