SHOW:
|
|
- or go back to the newest paste.
1 | TextField textfieldStyle = new TextField.TextFieldStyle(); | |
2 | textfieldStyle.font = registrationFont25; | |
3 | textfieldStyle.fontColor = Color.WHITE; | |
4 | cursorSprite = new Sprite(new Texture("sprites/cursor9.png")); | |
5 | textfieldStyle.cursor = new SpriteDrawable(cursorSprite); | |
6 | ||
7 | private TextField makeTextField(final Sprite fillUp_sprite, float padding, String messageText, boolean passwordMode){ | |
8 | TextField textField = new TextField("", textfieldStyle); | |
9 | textField.setMessageText(messageText); | |
10 | textField.setAlignment(Align.left); | |
11 | textField.setPasswordCharacter('*'); | |
12 | textField.setPasswordMode(passwordMode); | |
13 | textField.setPosition(fillUp_sprite.getX() + padding, fillUp_sprite.getY()); | |
14 | textField.setSize(fillUp_sprite.getWidth(), fillUp_sprite.getHeight()); | |
15 | ||
16 | return textField; | |
17 | } |