Class Text


  • public class Text
    extends Component
    Renders text with give font and colour. Uses transform component for position but if not present then internal position is the bottom left mainly used for debug doen't fully work but is usable
    • Constructor Summary

      Constructors 
      Constructor Description
      Text()  
      Text​(com.badlogic.gdx.math.Vector3 fontColour)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cleanUp()
      Called once after the update loop has finished.
      void render()
      Called once per frame used exclusively for rendering
      void setFontColour​(com.badlogic.gdx.math.Vector3 col)  
      void setPosition​(float x, float y)
      isn't used if parent has a transform component
      void setPosition​(com.badlogic.gdx.math.Vector2 pos)
      isn't used if parent has a transform component
      void setText​(java.lang.String text)  
      void update()
      Called once per frame
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Text

        public Text()
      • Text

        public Text​(com.badlogic.gdx.math.Vector3 fontColour)
    • Method Detail

      • setPosition

        public void setPosition​(com.badlogic.gdx.math.Vector2 pos)
        isn't used if parent has a transform component
        Parameters:
        pos - pos to render the text
      • setPosition

        public void setPosition​(float x,
                                float y)
        isn't used if parent has a transform component
      • setFontColour

        public void setFontColour​(com.badlogic.gdx.math.Vector3 col)
      • setText

        public void setText​(java.lang.String text)
      • update

        public void update()
        Description copied from class: Component
        Called once per frame
        Overrides:
        update in class Component
      • render

        public void render()
        Description copied from class: Component
        Called once per frame used exclusively for rendering
        Overrides:
        render in class Component
      • cleanUp

        public void cleanUp()
        Description copied from class: Component
        Called once after the update loop has finished.
        Overrides:
        cleanUp in class Component