public class ComponentInputField extends GuiComponent
| Constructor and Description |
|---|
ComponentInputField(Gui gui,
int x,
int y,
int sizeX,
int sizeY,
boolean renderBox,
boolean selectable,
boolean defaultActive,
int maxLength,
boolean displayMaxLength) |
ComponentInputField(Gui gui,
int x,
int y,
int sizeX,
int sizeY,
boolean renderBox,
boolean selectable,
boolean defaultActive,
int maxLength,
boolean displayMaxLength,
java.util.function.Consumer<java.lang.String> consumer) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(java.lang.String text) |
java.lang.String |
getDisplayText() |
IResourceName |
getName() |
java.lang.String |
getText() |
boolean |
isSelected() |
boolean |
onKeyboardAction(IGameInstance game,
int button,
char character) |
boolean |
onMouseAction(IGameInstance game,
int button,
float x,
float y) |
void |
render(IGameInstance game,
IAssetManager manager,
IGraphics g,
int x,
int y) |
void |
setSelected(boolean selected) |
void |
setText(java.lang.String text) |
void |
update(IGameInstance game) |
getElementColor, getElementOutlineColor, getGuiColor, getHeight, getPriority, getRenderX, getRenderY, getUnselectedElementColor, getWidth, getX, getY, isActive, isMouseOver, isMouseOverPrioritized, renderOverlay, setActive, shouldDoFingerCursor, toStringpublic ComponentInputField(Gui gui, int x, int y, int sizeX, int sizeY, boolean renderBox, boolean selectable, boolean defaultActive, int maxLength, boolean displayMaxLength)
public ComponentInputField(Gui gui, int x, int y, int sizeX, int sizeY, boolean renderBox, boolean selectable, boolean defaultActive, int maxLength, boolean displayMaxLength, java.util.function.Consumer<java.lang.String> consumer)
public boolean isSelected()
public void setSelected(boolean selected)
public boolean onKeyboardAction(IGameInstance game, int button, char character)
onKeyboardAction in class GuiComponentpublic IResourceName getName()
getName in class GuiComponentpublic void update(IGameInstance game)
update in class GuiComponentpublic java.lang.String getText()
public java.lang.String getDisplayText()
public void render(IGameInstance game, IAssetManager manager, IGraphics g, int x, int y)
render in class GuiComponentpublic void setText(java.lang.String text)
public void append(java.lang.String text)
public boolean onMouseAction(IGameInstance game, int button, float x, float y)
onMouseAction in class GuiComponent