Skip to main content

GUIText

class GUIText

Class responsible for creating and modifying 2D texts.


public class GUIText extends GUIElement

— Constructors (10) —

ConstructorDescription
GUIText()Creates a new GUIText.
GUIText(String text, int x, int y, int width, int height)Creates a new GUIText with its current text defined to be "text" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument and height to be "height" argument.
GUIText(String text, Font font, int x, int y, int width, int height)Creates a new GUIText with its current text defined to be "text" argument, font to be "font" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument and height to be "height" argument.
GUIText(String text, Font font, int x, int y, int width, int height, [Alignment] alignment)Creates a new GUIText with its current text defined to be "text" argument, font to be "font" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be "height" argument " and alignment to be "alignment" argument.
GUIText(String text, Font font, int x, int y, int width, int height, [Alignment] alignment, float scale)Creates a new GUIText with its current text defined to be "text" argument, font to be "font" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be "height" argument ", alignment to be "alignment" argument and scale to be "scale" argument.
GUIText(Color color, String text, Font font, int x, int y, int width, int height, [Alignment] alignment, float scale)Creates a new GUIText with its current color defined to be "color" argument, text to be "text" argument, font in the "font" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument ", height to be "height" argument, alignment to be "alignment" argument and scale to be "scale" argument.
GUIText(Color color, String text, int x, int y, int width, int height)Creates a new GUIText with its current color defined to be "color" argument, text to be "text" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument and height to be "height" argument.
GUIText(Color color, String text, GUIRect guiRect)Creates a new GUIText with its current color defined to be "color" argument, text to be "text" argument, and Rect(GUIRect) to be "guiRect" argument.
GUIText(Color color, String text, int x, int y, int width, int height, int layer)Creates a new GUIText with its current color defined to be "color" argument, text to be "text" argument, X position to be "x" argument, Y position to be "y" argument, width to be "width" argument, height to be "height" argument " and layer to be "layer" argument.
GUIText(Color color, String text, GUIRect guiRect, int layer)Creates a new GUIText with its current color defined to be "color" argument, text to be "text" argument, Rect(GUIRect) to be "guiRect" argument and layer to be "layer" argument.

— Methods (10) —

NameDescription
Color getColor()Returns the current GUIText color.
void setColor(Color color)Sets the current GUIText color to be "color" argument.
float getScale()Returns the current GUIText scale.
void setScale(float scale)Sets the current scale of the GUIText to be "scale" argument.
[Alignment] getAlignment()Returns the current alignment("TopLeft", "TopCenter", "TopRight", "MiddleLeft", "MiddleCenter", "MiddleRight", "BottomLeft", "BottomCenter" or "BottomRight") of the GUIText.
void setAlignment([Alignment] alignment)Sets the current alignment("TopLeft", "TopCenter", "TopRight", "MiddleLeft", "MiddleCenter", "MiddleRight", "BottomLeft", "BottomCenter" or "BottomRight") of the GUIText to be "alignment" argument.
String getText()Returns the current text of the GUIText.
void setText(String text)Sets the current GUIText text to be "text" argument.
Font getFont()Returns the current GUIText font.
void setFont(Font font)Sets the current GUIText font to be "font" argument.