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
detailButton, 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 voidapplyPopupValue(T value) protected net.minecraft.client.gui.components.EditBoxprotected booleanWhether this entry exposes a 20x20 square detail-editor button to the left of its primary widget.protected 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, createDetailButton, determineLockState, extractContent, getDefaultValueTooltip, getDetailButtonLabel, getDetailButtonTooltip, getMaxLabelWidth, isDefault, isModified, matchesSearch, narratables, openDetailPopup, 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. -
hasDetailPopup
protected boolean hasDetailPopup()Description copied from class:OptionEntryWhether this entry exposes a 20x20 square detail-editor button to the left of its primary widget.Invoked during
OptionEntryconstruction; subclasses overriding this method should return a constant value without depending on subclass fields initialized aftersuper(...).- Overrides:
hasDetailPopupin classOptionEntry<T, net.minecraft.client.gui.components.EditBox>
-
applyPopupValue
-