Class ColorInputWidget
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.EditBox
net.uku3lig.ukulib.config.option.widget.TextInputWidget
net.uku3lig.ukulib.config.option.widget.ColorInputWidget
- All Implemented Interfaces:
net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement, net.minecraft.client.gui.layouts.LayoutElement, net.minecraft.client.gui.narration.NarratableEntry, net.minecraft.client.gui.narration.NarrationSupplier, CheckedOption
A widget that allows the user to input a color.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.components.EditBox
net.minecraft.client.gui.components.EditBox.TextFormatterNested classes/interfaces inherited from class net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractWidget.WithInactiveMessageNested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority -
Field Summary
Fields inherited from class net.minecraft.client.gui.components.EditBox
BACKWARDS, DEFAULT_HINT_STYLE, DEFAULT_TEXT_COLOR, FORWARDS, SEARCH_HINT_STYLEFields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, message, visible, width -
Constructor Summary
ConstructorsConstructorDescriptionColorInputWidget(int x, int y, int width, int height, int initialValue, IntConsumer changedListener, String suggestion, boolean allowAlpha) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidextractWidgetRenderState(@NotNull net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float delta) Methods inherited from class TextInputWidget
getText, isValid, setTextMethods inherited from class net.minecraft.client.gui.components.EditBox
addFormatter, canConsumeInput, capturesInput, charTyped, createNarrationMessage, deleteChars, deleteCharsToPos, deleteWords, getCursorPosition, getHighlighted, getInnerWidth, getScreenX, getValue, getWordPosition, insertText, isBordered, isVisible, keyPressed, moveCursor, moveCursorTo, moveCursorToEnd, moveCursorToStart, onClick, onDrag, playDownSound, preeditUpdated, setBordered, setCanLoseFocus, setCentered, setCursorPosition, setEditable, setFocused, setHighlightPos, setHint, setInvertHighlightedTextColor, setMaxLength, setResponder, setSuggestion, setTextColor, setTextColorUneditable, setTextShadow, setValue, setVisible, setX, setY, updateWidgetNarrationMethods inherited from class net.minecraft.client.gui.components.AbstractWidget
defaultButtonNarrationText, extractRenderState, extractScrollingStringOverContents, extractTooltipForNextRenderPass, getAlpha, getBottom, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, handleCursor, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onRelease, playButtonClickSound, setAlpha, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, updateNarration, visitWidgets, wrapDefaultNarrationMessageMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getBorderForArrowNavigation, getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolled, shouldTakeFocusAfterInteractionMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPositionMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
getNarratables
-
Constructor Details
-
ColorInputWidget
public ColorInputWidget(int x, int y, int width, int height, int initialValue, IntConsumer changedListener, String suggestion, boolean allowAlpha) Constructor.- Parameters:
x- the x positiony- the y positionwidth- the widthheight- the heightinitialValue- the initial valuechangedListener- the listener that is called when the value changessuggestion- the suggestionallowAlpha- whether to allow changing the alpha value
-
-
Method Details
-
extractWidgetRenderState
public void extractWidgetRenderState(@NotNull @NotNull net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float delta) - Overrides:
extractWidgetRenderStatein classTextInputWidget
-