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
- Direct Known Subclasses:
ARGBColorEntry,RGBColorEntry
-
Field Summary
Fields inherited from class johnsmith.configoverhauled.impl.client.gui.entry.OptionEntry
isLocked, labelComponent, minecraft, onValueChanged, parentScreen, property, resetButton, tooltip, widgetFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionColorEntry(P property, ConfigScreen parentScreen, net.minecraft.client.Minecraft minecraft, Runnable onValueChanged) -
Method Summary
Modifier and TypeMethodDescriptionbooleancharTyped(char codePoint, int modifiers) 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(int keyCode, int scanCode, int modifiers) protected Integervoidrender(@NotNull net.minecraft.client.gui.GuiGraphics guiGraphics, int index, int top, int left, int width, int height, int mouseX, int mouseY, boolean hovering, float partialTick) protected voidrenderColorPreview(net.minecraft.client.gui.GuiGraphics guiGraphics, int boxX, int boxY, int boxSize, int baseColor, int mouseX, int mouseY) protected voidrenderNextColorPreviewTriangle(net.minecraft.client.gui.GuiGraphics guiGraphics, 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 johnsmith.configoverhauled.impl.client.gui.entry.bounded.BoundedEntry
applyInput, getBoundsMethods inherited from class johnsmith.configoverhauled.impl.client.gui.entry.AbstractTextEntry
createWidget, restoreCurrentValueMethods inherited from class johnsmith.configoverhauled.impl.client.gui.entry.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseDragged, mouseReleased, mouseScrolled, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, getRectangle, isMouseOver, mouseMovedMethods 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>
-
charTyped
public boolean charTyped(char codePoint, int modifiers) -
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) -
renderColorPreview
protected void renderColorPreview(net.minecraft.client.gui.GuiGraphics guiGraphics, int boxX, int boxY, int boxSize, int baseColor, int mouseX, int mouseY) -
renderNextColorPreviewTriangle
protected void renderNextColorPreviewTriangle(net.minecraft.client.gui.GuiGraphics guiGraphics, 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>
-
render
public void render(@NotNull @NotNull net.minecraft.client.gui.GuiGraphics guiGraphics, int index, int top, int left, int width, int height, int mouseX, int mouseY, boolean hovering, float partialTick) - Overrides:
renderin classBoundedEntry<Integer>
-