public class ComponentInputField extends GuiComponent
colorButton, colorButtonUnselected, colorOutline, gui, guiColor, height, width, x, y| 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 |
|---|---|
java.lang.String |
getDisplayText() |
IResourceName |
getName() |
java.lang.String |
getText() |
boolean |
isActive() |
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 |
setText(java.lang.String text) |
void |
update(IGameInstance game) |
getPriority, getRenderX, getRenderY, getX, getY, isMouseOver, isMouseOverPrioritized, renderOverlay, 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 isActive()
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 boolean onMouseAction(IGameInstance game, int button, float x, float y)
onMouseAction in class GuiComponent