java.lang.Object
org.collebol.client.gui.graphics.ui.Component
org.collebol.client.gui.graphics.ui.component.TextInput

public class TextInput extends Component
The TextInput class represents a UI Component that allows user input. A TextInput can hold text, a cursor position, and background/border styling.

Usage:

     TextInput input = new TextInput(new TextInput.TextInputBuilder(1)
         .position(new Vector2D(50, 50))
         .width(200)
         .height(30)
         .backgroundColor(Color.WHITE)
         .borderColor(Color.BLACK)
         .text(new Text(new Text.TextBuilder().text("Enter name")))
     );
 
  • Constructor Details

  • Method Details

    • getText

      public Text getText()
    • setText

      public void setText(Text text)
    • getBackgroundColor

      public float[] getBackgroundColor()
    • setBackgroundColor

      public void setBackgroundColor(float[] backgroundColor)
    • getBorderSize

      public float getBorderSize()
    • setBorderSize

      public void setBorderSize(float borderSize)
    • getBorderColor

      public float[] getBorderColor()
    • setBorderColor

      public void setBorderColor(float[] borderColor)
    • getCursorPosition

      public int getCursorPosition()
    • setCursorPosition

      public void setCursorPosition(int cursorPosition)
    • isFocused

      public boolean isFocused()
    • setFocused

      public void setFocused(boolean focused)