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
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) 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 abstract intprotected abstract intgetPreviewColor(int rawValue) protected Stringprotected booleanisPartialInput(String input) protected BooleanisWithinBounds(Integer value) booleankeyPressed(net.minecraft.client.input.KeyEvent event) protected Integerprotected voidrenderColorPreview(net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int boxX, int boxY, int boxSize, int baseColor, int mouseX, int mouseY) 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, getBoundsMethods inherited from class AbstractTextEntry
createWidget, restoreCurrentValueMethods inherited from class OptionEntry
canReset, children, isDefault, isModified, matchesSearch, narratables, 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
-
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) -
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) -
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>
-
extractContent
public void extractContent(@NotNull @NotNull net.minecraft.client.gui.GuiGraphicsExtractor guiGraphicsExtractor, int mouseX, int mouseY, boolean isHovering, float partialTick) - Overrides:
extractContentin classBoundedEntry<Integer>
-