Package net.uku3lig.ukulib.config.impl
Class StringInputScreen
java.lang.Object
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.navigation.Navigable,net.minecraft.client.gui.ParentElement
Basic implementation of
TextInputScreen used to input a String of any type.-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.screen.Screen
net.minecraft.client.gui.screen.Screen.SelectedElementNarrationData -
Field Summary
Fields inherited from class net.uku3lig.ukulib.config.screen.CloseableScreen
parentFields inherited from class net.minecraft.client.gui.screen.Screen
client, executor, height, OPTIONS_BACKGROUND_TEXTURE, textRenderer, title, widthFields inherited from interface net.minecraft.client.gui.Element
MAX_DOUBLE_CLICK_INTERVAL -
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, onTextChange, removed, renderMethods inherited from class net.uku3lig.ukulib.config.screen.CloseableScreen
closeMethods inherited from class net.minecraft.client.gui.screen.Screen
addDrawable, addDrawableChild, addElementNarrations, addScreenNarrations, addSelectableChild, applyKeyPressNarratorDelay, applyMouseMoveNarratorDelay, applyMousePressScrollNarratorDelay, applyNarratorModeChangeDelay, children, clearAndInit, clearChildren, filesDragged, findSelectedElementData, getMusic, getNarratedTitle, getNavigationFocus, getTitle, getTooltipFromItem, handleTextClick, hasAltDown, hasControlDown, hasShiftDown, hasUsageText, hide, init, initTabNavigation, insertText, isCopy, isCut, isMouseOver, isPaste, isSelectAll, isValidCharacterForName, keyPressed, narrateScreenIfNarrationEnabled, onDisplayed, remove, renderBackground, renderBackgroundTexture, renderWithTooltip, resize, setInitialFocus, setTooltip, setTooltip, setTooltip, setTooltip, shouldCloseOnEsc, shouldPause, switchFocus, tick, updateNarrator, wrapScreenErrorMethods inherited from class net.minecraft.client.gui.AbstractParentElement
getFocused, isDragging, setDragging, setFocusedMethods 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.navigation.Navigable
getNavigationOrderMethods inherited from interface net.minecraft.client.gui.ParentElement
charTyped, focusOn, getFocusedPath, getNavigationPath, hoveredElement, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setFocused
-
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
-