Package noppes.npcs.api.gui
Interface ITextField
-
- All Superinterfaces:
ICustomGuiComponent
public interface ITextField extends ICustomGuiComponent
Represents a text field component in a custom GUI. Provides methods to get or set its size and text content.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getHeight()
Returns the height of the text field.java.lang.String
getText()
Returns the current text content of the text field.int
getWidth()
Returns the width of the text field.ITextField
setSize(int width, int height)
Sets the size of the text field.ITextField
setText(java.lang.String text)
Sets the text content of the text field.-
Methods inherited from interface noppes.npcs.api.gui.ICustomGuiComponent
fromNBT, getAlpha, getColor, getHoverText, getID, getPosX, getPosY, getRotation, hasHoverText, setAlpha, setColor, setHoverText, setHoverText, setID, setPos, setRotation, toNBT
-
-
-
-
Method Detail
-
getWidth
int getWidth()
Returns the width of the text field.- Returns:
- the width in pixels.
-
getHeight
int getHeight()
Returns the height of the text field.- Returns:
- the height in pixels.
-
setSize
ITextField setSize(int width, int height)
Sets the size of the text field.- Parameters:
width
- the new width.height
- the new height.- Returns:
- this text field instance.
-
getText
java.lang.String getText()
Returns the current text content of the text field.- Returns:
- the text.
-
setText
ITextField setText(java.lang.String text)
Sets the text content of the text field.- Parameters:
text
- the new text.- Returns:
- this text field instance.
-
-