public class InputFieldComponent extends GuiComponent
| Modifier and Type | Field and Description |
|---|---|
java.util.function.Consumer<java.lang.String> |
consumer |
boolean |
displaxMaxLength |
int |
maxLength |
boolean |
renderBox |
boolean |
selectable |
| Constructor and Description |
|---|
InputFieldComponent(Gui gui,
int x,
int y,
int sizeX,
int sizeY,
boolean renderBox,
boolean selectable,
boolean defaultActive,
int maxLength,
boolean displayMaxLength) |
InputFieldComponent(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) |
boolean |
canCloseWithInvKey() |
java.lang.String |
getDisplayText() |
ResourceName |
getName() |
java.lang.String |
getText() |
boolean |
isCensored() |
boolean |
isSelected() |
boolean |
onCharInput(IGameInstance game,
int codePoint,
char[] characters) |
boolean |
onKeyPressed(IGameInstance game,
int button) |
boolean |
onMouseAction(IGameInstance game,
int button,
float x,
float y) |
void |
render(IGameInstance game,
IAssetManager manager,
IRenderer g,
int x,
int y) |
InputFieldComponent |
setCensored(boolean censored) |
void |
setSelected(boolean selected) |
void |
setText(java.lang.String text) |
getElementColor, getElementOutlineColor, getGuiColor, getHeight, getPriority, getRenderX, getRenderY, getUnselectedElementColor, getWidth, getX, getY, isActive, isMouseOver, isMouseOverPrioritized, renderOverlay, setActive, setPos, shouldDoFingerCursor, toString, update, updateInactivepublic final boolean renderBox
public final boolean selectable
public final int maxLength
public final boolean displaxMaxLength
public final java.util.function.Consumer<java.lang.String> consumer
public InputFieldComponent(Gui gui, int x, int y, int sizeX, int sizeY, boolean renderBox, boolean selectable, boolean defaultActive, int maxLength, boolean displayMaxLength)
public InputFieldComponent(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 isCensored()
public InputFieldComponent setCensored(boolean censored)
public boolean onKeyPressed(IGameInstance game, int button)
onKeyPressed in class GuiComponentpublic boolean onCharInput(IGameInstance game, int codePoint, char[] characters)
onCharInput in class GuiComponentpublic ResourceName getName()
getName in class GuiComponentpublic java.lang.String getText()
public void setText(java.lang.String text)
public java.lang.String getDisplayText()
public void render(IGameInstance game, IAssetManager manager, IRenderer g, int x, int y)
render in class GuiComponentpublic void append(java.lang.String text)
public boolean onMouseAction(IGameInstance game, int button, float x, float y)
onMouseAction in class GuiComponentpublic boolean canCloseWithInvKey()
canCloseWithInvKey in class GuiComponent