public class ComponentInputField extends GuiComponent
| Modifier and Type | Field | Description |
|---|---|---|
java.util.function.Consumer<java.lang.String> |
consumer |
|
boolean |
displaxMaxLength |
|
int |
maxLength |
|
boolean |
renderBox |
|
boolean |
selectable |
| Constructor | 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 | Description |
|---|---|---|
void |
append(java.lang.String text) |
|
boolean |
canCloseWithInvKey() |
|
java.lang.String |
getDisplayText() |
|
IResourceName |
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) |
|
ComponentInputField |
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, updatepublic 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 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 isCensored()
public ComponentInputField 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 IResourceName getName()
getName in class GuiComponentpublic java.lang.String getText()
public java.lang.String getDisplayText()
public void render(IGameInstance game, IAssetManager manager, IRenderer 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 GuiComponentpublic boolean canCloseWithInvKey()
canCloseWithInvKey in class GuiComponent