= password
:revnumber: 2.0
:revdate: 2020/07/25



== Password Class

The password class extends TextField and adds the ability to set a mask character.

It uses the standard 3 constructors as shown in the xref:gui/tonegodgui/quickstart.adoc[Quick Start Guide].

*Constructor 1:*

[source,java]
----

/** Parameters:
  * Screen screen,
  * String UID,
  * Vector2f position
  */

Password pw = new Password(screen, "password", new Vector2f(15, 15));

----

*Constructor 2:*

[source,java]
----

/** Additional Parameter:
  * Vector2f dimensions  */

Password pw = new Password(screen, "password", new Vector2f(15, 15),
    new Vector2f(150, 25)
);

----

*Constructor 3:*

[source,java]
----

/** Additional Parameters:
  * Vector4f resizeBorders,
  * String defaultImg
  */

Password pw = new Password(screen, "password", new Vector2f(15, 15), new Vector2f(150, 25),
    new Vector4f(3,3,3,3),
    "tonegod/gui/style/def/TextField/text_field_x.png"
);

----



=== Password specific methods:

[source,java]
----

pw.setMask(char mask);
pw.getMask(); // Returns mask character as a String

----
