Class TextInput
java.lang.Object
org.collebol.client.gui.graphics.ui.Component
org.collebol.client.gui.graphics.ui.component.TextInput
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")))
);
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat[]float[]floatintgetText()booleanvoidsetBackgroundColor(float[] backgroundColor) voidsetBorderColor(float[] borderColor) voidsetBorderSize(float borderSize) voidsetCursorPosition(int cursorPosition) voidsetFocused(boolean focused) voidMethods inherited from class org.collebol.client.gui.graphics.ui.Component
getHeight, getId, getPosition, getWidth, setHeight, setId, setPosition, setWidth
-
Constructor Details
-
TextInput
-
-
Method Details
-
getText
-
setText
-
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)
-