Class AbstractTextEntry<T>
java.lang.Object
net.minecraft.client.gui.components.ContainerObjectSelectionList.Entry<AbstractConfigEntry>
johnsmith.configoverhauled.api.client.gui.entry.AbstractConfigEntry
johnsmith.configoverhauled.impl.client.gui.entry.OptionEntry<T, net.minecraft.client.gui.components.EditBox>
johnsmith.configoverhauled.impl.client.gui.entry.AbstractTextEntry<T>
- All Implemented Interfaces:
ConfigEntry, net.minecraft.client.gui.components.events.ContainerEventHandler, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.TabOrderedElement, net.minecraft.client.gui.layouts.LayoutElement
- Direct Known Subclasses:
BoundedEntry, ListEntry, StringEntry
public abstract class AbstractTextEntry<T>
extends OptionEntry<T, net.minecraft.client.gui.components.EditBox>
-
Field Summary
Fields inherited from class OptionEntry
isLocked, labelComponent, minecraft, onValueChanged, parentScreen, property, resetButton, tooltip, widget -
Constructor Summary
ConstructorsConstructorDescriptionAbstractTextEntry(Property<T> property, ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, Runnable onValueChanged) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidapplyInput(String input) Called when the user commits their input (Presses Enter or clicks away).protected net.minecraft.client.gui.components.EditBoxprotected voidUtility method to revert the UI if the committed input was invalid.protected abstract voidsetupEditBox(net.minecraft.client.gui.components.EditBox box) Attaches live responders or input filters to the EditBox (e.g., coloring text red on invalid input).Methods inherited from class OptionEntry
canReset, children, extractContent, getDefaultValueTooltip, isDefault, isModified, matchesSearch, narratables, resetToDefault, setValue, updateResetButton, updateWidgetValueMethods inherited from class net.minecraft.client.gui.components.ContainerObjectSelectionList.Entry
focusPathAtIndex, getFocused, isDragging, mouseClicked, nextFocusPath, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyPressed, keyReleased, mouseDragged, mouseReleased, mouseScrolled, preeditUpdated, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getRectangle, isMouseOver, mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPositionMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Constructor Details
-
AbstractTextEntry
public AbstractTextEntry(Property<T> property, ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, Runnable onValueChanged)
-
-
Method Details
-
createWidget
protected net.minecraft.client.gui.components.EditBox createWidget()- Specified by:
createWidgetin classOptionEntry<T, net.minecraft.client.gui.components.EditBox>
-
setupEditBox
protected abstract void setupEditBox(net.minecraft.client.gui.components.EditBox box) Attaches live responders or input filters to the EditBox (e.g., coloring text red on invalid input). -
applyInput
Called when the user commits their input (Presses Enter or clicks away). -
restoreCurrentValue
protected void restoreCurrentValue()Utility method to revert the UI if the committed input was invalid.
-