Class GUIText


  • public class GUIText
    extends Object
    Class that represents a renderable text
    Author:
    Darius Dinger
    • Method Detail

      • setText

        public void setText​(String text)
        Setting text and recreating chars
        Parameters:
        text - New text of the GUIText
      • getText

        public String getText()
        Returns:
        Text of the GUIText
      • setFont

        public void setFont​(String font)
        Setting font of the text and recreating chars
        Parameters:
        font - New font of the text
      • setAlignment

        public void setAlignment​(GUIText.Alignment alignment)
        Setting the text alignment. Text will be aligned CENTERED, on the RIGHT or LEFT edge of the GUIPane (note the padding).
        Parameters:
        alignment - New alignment
      • getFont

        public String getFont()
        Returns:
        Font of the text
      • setFontSize

        public void setFontSize​(float fontSize)
        Parameters:
        fontSize - New size of the font
      • getChars

        public GUIChar[] getChars()
        Returns:
        Characters of the text to render
      • getFontSize

        public float getFontSize()
        Returns:
        Font size of the text
      • setPadding

        public void setPadding​(float padding)
        Parameters:
        padding - Padding of the gui text to the pane border
      • getFontColor

        public Color getFontColor()
        Returns:
        Read/writeable color of the text/font