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<Integer, net.minecraft.client.gui.components.EditBox>
johnsmith.configoverhauled.impl.client.gui.entry.AbstractTextEntry<Integer>
johnsmith.configoverhauled.impl.client.gui.entry.bounded.BoundedEntry<Integer>
johnsmith.configoverhauled.impl.client.gui.entry.bounded.ColorEntry<P>
- 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:
ARGBColorEntry, RGBColorEntry
-
Field Summary
Fields inherited from class OptionEntry
detailButton, isLocked, labelComponent, minecraft, onValueChanged, parentScreen, property, resetButton, tooltip, widget -
Constructor Summary
ConstructorsConstructorDescriptionColorEntry(P property, ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, Runnable onValueChanged) -
Method Summary
Modifier and TypeMethodDescriptionbooleancharTyped(net.minecraft.client.input.CharacterEvent event) @NotNull List<? extends net.minecraft.client.gui.components.events.GuiEventListener> children()protected voidvoidextractContent(@NotNull net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int mouseX, int mouseY, boolean isHovering, float partialTick) protected abstract net.minecraft.util.FormattedCharSequenceformatColorString(String text, int cursorOffset) protected net.minecraft.network.chat.Componentprotected net.minecraft.network.chat.Componentprotected net.minecraft.network.chat.Componentprotected abstract Stringprotected intgetMaxLabelWidth(int widgetX) protected abstract intprotected abstract intgetPreviewColor(int rawValue) protected Stringprotected booleanhasAlpha()protected booleanWhether this entry exposes a 20x20 square detail-editor button to the left of its primary widget.protected booleanisPartialInput(String input) protected BooleanisWithinBounds(Integer value) booleankeyPressed(net.minecraft.client.input.KeyEvent event) @NotNull List<? extends net.minecraft.client.gui.narration.NarratableEntry> protected voidprotected Integerprotected voidrenderColorPreview(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int boxX, int boxY, int boxSize, int baseColor, int mouseX, int mouseY, boolean highlighted) protected voidrenderNextColorPreviewTriangle(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int boxX, int boxY, int boxSize, int color) protected 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).protected voidMethods inherited from class BoundedEntry
applyInput, formatValue, getBounds, openDetailPopupMethods inherited from class AbstractTextEntry
applyPopupValue, createWidget, restoreCurrentValueMethods inherited from class OptionEntry
canReset, createDetailButton, determineLockState, getDetailButtonLabel, getDetailButtonTooltip, isDefault, isModified, matchesSearch, resetToDefault, setValue, updateResetButtonMethods 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
getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, 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
-
ColorEntry
public ColorEntry(P property, ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, Runnable onValueChanged)
-
-
Method Details
-
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 classAbstractTextEntry<Integer>
-
hasAlpha
protected boolean hasAlpha() -
getHexFormatString
-
getMaxLength
protected abstract int getMaxLength() -
getPreviewColor
protected abstract int getPreviewColor(int rawValue) -
formatColorString
protected abstract net.minecraft.util.FormattedCharSequence formatColorString(String text, int cursorOffset) -
openColorPicker
protected void openColorPicker() -
parse
- Specified by:
parsein classBoundedEntry<Integer>- Throws:
NumberFormatException
-
getRegexFilter
- Specified by:
getRegexFilterin classBoundedEntry<Integer>
-
isPartialInput
- Specified by:
isPartialInputin classBoundedEntry<Integer>
-
setupEditBox
protected void setupEditBox(net.minecraft.client.gui.components.EditBox box) Description copied from class:AbstractTextEntryAttaches live responders or input filters to the EditBox (e.g., coloring text red on invalid input).- Overrides:
setupEditBoxin classBoundedEntry<Integer>
-
updateWidgetValue
protected void updateWidgetValue()- Specified by:
updateWidgetValuein classOptionEntry<Integer, net.minecraft.client.gui.components.EditBox>
-
isWithinBounds
- Overrides:
isWithinBoundsin classBoundedEntry<Integer>
-
enforceHexFormatting
protected void enforceHexFormatting() -
charTyped
public boolean charTyped(net.minecraft.client.input.CharacterEvent event) -
keyPressed
public boolean keyPressed(net.minecraft.client.input.KeyEvent event) -
renderColorPreview
protected void renderColorPreview(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int boxX, int boxY, int boxSize, int baseColor, int mouseX, int mouseY, boolean highlighted) -
renderNextColorPreviewTriangle
protected void renderNextColorPreviewTriangle(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int boxX, int boxY, int boxSize, int color) -
getCurrentValueTooltipText
protected net.minecraft.network.chat.Component getCurrentValueTooltipText()- Overrides:
getCurrentValueTooltipTextin classBoundedEntry<Integer>
-
getBoundsTooltipText
protected net.minecraft.network.chat.Component getBoundsTooltipText()- Overrides:
getBoundsTooltipTextin classBoundedEntry<Integer>
-
getDefaultValueTooltip
protected net.minecraft.network.chat.Component getDefaultValueTooltip()- Overrides:
getDefaultValueTooltipin classOptionEntry<Integer, net.minecraft.client.gui.components.EditBox>
-
getMaxLabelWidth
protected int getMaxLabelWidth(int widgetX) - Overrides:
getMaxLabelWidthin classOptionEntry<Integer, net.minecraft.client.gui.components.EditBox>
-
extractContent
public void extractContent(@NotNull @NotNull net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int mouseX, int mouseY, boolean isHovering, float partialTick) - Overrides:
extractContentin classBoundedEntry<Integer>
-
children
@NotNull public @NotNull List<? extends net.minecraft.client.gui.components.events.GuiEventListener> children()- Specified by:
childrenin interfacenet.minecraft.client.gui.components.events.ContainerEventHandler- Overrides:
childrenin classOptionEntry<Integer, net.minecraft.client.gui.components.EditBox>
-
narratables
@NotNull public @NotNull List<? extends net.minecraft.client.gui.narration.NarratableEntry> narratables()- Overrides:
narratablesin classOptionEntry<Integer, net.minecraft.client.gui.components.EditBox>
-