Package net.uku3lig.ukulib.config.impl
Class StringInputScreen
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.screen.Screen
net.uku3lig.ukulib.config.screen.CloseableScreen
net.uku3lig.ukulib.config.screen.TextInputScreen<String>
net.uku3lig.ukulib.config.impl.StringInputScreen
- All Implemented Interfaces:
net.minecraft.client.gui.Drawable,net.minecraft.client.gui.Element,net.minecraft.client.gui.ParentElement,net.minecraft.client.gui.screen.TickableElement
Basic implementation of
TextInputScreen used to input a String of any type.-
Field Summary
Fields inherited from class net.uku3lig.ukulib.config.screen.CloseableScreen
parentFields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, client, height, itemRenderer, passEvents, textRenderer, title, widthFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
ConstructorsConstructorDescriptionStringInputScreen(net.minecraft.client.gui.screen.Screen parent, net.minecraft.text.Text title, net.minecraft.text.Text label, Consumer<String> callback, String last, ConfigManager<?> manager) Creates an input screen. -
Method Summary
Methods inherited from class net.uku3lig.ukulib.config.screen.TextInputScreen
format, getTextField, init, onClose, onTextChange, removed, renderMethods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addChild, children, filesDragged, getNarrationMessage, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, renderBackground, renderBackground, renderBackgroundTexture, renderOrderedTooltip, renderTextHoverEffect, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, shouldCloseOnEsc, tick, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredText, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
mouseMovedMethods inherited from interface net.minecraft.client.gui.ParentElement
changeFocus, charTyped, focusOn, hoveredElement, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
Constructor Details
-
StringInputScreen
public StringInputScreen(net.minecraft.client.gui.screen.Screen parent, net.minecraft.text.Text title, net.minecraft.text.Text label, Consumer<String> callback, String last, ConfigManager<?> manager) Creates an input screen.- Parameters:
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 config
-
-
Method Details
-
convert
Description copied from class:TextInputScreenConverts the contents of the text field to the type needed.- Specified by:
convertin classTextInputScreen<String>- Parameters:
value- The value of the text field, given by the user- Returns:
- An empty optional is the value is incorrect, else the converted value
-