T - The type of the value.public abstract class TextInputScreen<T>
extends net.minecraft.client.gui.Screen
| Modifier | Constructor and Description |
|---|---|
protected |
TextInputScreen(net.minecraft.client.gui.Screen parent,
java.lang.String title,
java.lang.String label,
java.util.function.Consumer<T> callback,
T last,
ConfigManager<?> manager)
Creates an input screen.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
buttonClicked(net.minecraft.client.gui.widgets.Button button) |
abstract java.util.Optional<T> |
convert(java.lang.String value)
Converts the contents of the text field to the type needed.
|
void |
init() |
protected void |
keyPressed(char c,
int i) |
protected void |
mouseClicked(int i,
int j,
int k) |
void |
onClose() |
void |
render(int mouseX,
int mouseY,
float delta) |
void |
tick() |
getClipboardContents, init, isPauseScreen, method_130, method_135, mouseReleased, onKeyboardEvent, onMouseEvent, renderBackground, renderBackground, renderDirtBackground, updateServerprotected TextInputScreen(net.minecraft.client.gui.Screen parent,
java.lang.String title,
java.lang.String label,
java.util.function.Consumer<T> callback,
T last,
ConfigManager<?> manager)
parent - The parent screentitle - The title of the screenlabel - The label to be shown above the text input fieldcallback - The action to be performed when the value is changedlast - The last known valuemanager - The config manager, used to save the configpublic void init()
init in class net.minecraft.client.gui.Screenprotected void buttonClicked(net.minecraft.client.gui.widgets.Button button)
buttonClicked in class net.minecraft.client.gui.Screenprotected void keyPressed(char c,
int i)
keyPressed in class net.minecraft.client.gui.Screenprotected void mouseClicked(int i,
int j,
int k)
mouseClicked in class net.minecraft.client.gui.Screenpublic abstract java.util.Optional<T> convert(java.lang.String value)
value - the value of the text field, given by the userpublic final void onClose()
onClose in class net.minecraft.client.gui.Screenpublic void tick()
tick in class net.minecraft.client.gui.Screenpublic void render(int mouseX,
int mouseY,
float delta)
render in class net.minecraft.client.gui.Screen