Text#

public class Text#

A text label. See Panel.addText(String, boolean).

RectTransform getRectTransform()#

The rect transform for the text.

boolean getVisible()#
void setVisible(boolean value)#

Whether the UI object is visible.

String getContent()#
void setContent(String value)#

The text string

String getFont()#
void setFont(String value)#

Name of the font

java.util.List<String> getAvailableFonts()#

A list of all available fonts.

int getSize()#
void setSize(int value)#

Font size.

FontStyle getStyle()#
void setStyle(FontStyle value)#

Font style.

org.javatuples.Triplet<Double, Double, Double> getColor()#
void setColor(org.javatuples.Triplet<Double, Double, Double> value)#

Set the color

TextAnchor getAlignment()#
void setAlignment(TextAnchor value)#

Alignment.

float getLineSpacing()#
void setLineSpacing(float value)#

Line spacing.

void remove()#

Remove the UI object.

public enum FontStyle#

Font style.

public FontStyle NORMAL#

Normal.

public FontStyle BOLD#

Bold.

public FontStyle ITALIC#

Italic.

public FontStyle BOLD_AND_ITALIC#

Bold and italic.

public enum TextAlignment#

Text alignment.

public TextAlignment LEFT#

Left aligned.

public TextAlignment RIGHT#

Right aligned.

public TextAlignment CENTER#

Center aligned.

public enum TextAnchor#

Text alignment.

public TextAnchor LOWER_CENTER#

Lower center.

public TextAnchor LOWER_LEFT#

Lower left.

public TextAnchor LOWER_RIGHT#

Lower right.

public TextAnchor MIDDLE_CENTER#

Middle center.

public TextAnchor MIDDLE_LEFT#

Middle left.

public TextAnchor MIDDLE_RIGHT#

Middle right.

public TextAnchor UPPER_CENTER#

Upper center.

public TextAnchor UPPER_LEFT#

Upper left.

public TextAnchor UPPER_RIGHT#

Upper right.