Class ColorInputWidget

java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
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

public class ColorInputWidget extends net.uku3lig.ukulib.config.option.widget.TextInputWidget
A widget that allows the user to input a color.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.client.gui.components.AbstractWidget

    net.minecraft.client.gui.components.AbstractWidget.WithInactiveMessage

    Nested 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.AbstractWidget

    active, alpha, height, isHovered, message, visible, width
  • Constructor Summary

    Constructors
    Constructor
    Description
    ColorInputWidget(int x, int y, int width, int height, int initialValue, IntConsumer changedListener, String suggestion, boolean allowAlpha)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    renderWidget(@NotNull net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float delta)
     

    Methods inherited from class net.uku3lig.ukulib.config.option.widget.TextInputWidget

    canConsumeInput, charTyped, createNarrationMessage, drawsBackground, eraseCharacters, eraseCharactersTo, eraseWords, getCursor, getInnerWidth, getSelectedText, getText, getWordSkipPosition, isValid, isVisible, keyPressed, moveCursor, onClick, onDrag, playDownSound, setCursor, setCursorToEnd, setCursorToStart, setFocused, setSelectionEnd, setSelectionStart, setText, setX, setY, updateWidgetNarration, write

    Methods inherited from class net.minecraft.client.gui.components.AbstractWidget

    defaultButtonNarrationText, getAlpha, getBottom, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getWidth, getX, getY, handleCursor, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onRelease, playButtonClickSound, render, renderScrollingStringOverContents, setAlpha, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, updateNarration, visitWidgets, wrapDefaultNarrationMessage

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    getBorderForArrowNavigation, getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolled, shouldTakeFocusAfterInteraction

    Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement

    setPosition

    Methods 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 position
      y - the y position
      width - the width
      height - the height
      initialValue - the initial value
      changedListener - the listener that is called when the value changes
      suggestion - the suggestion
      allowAlpha - whether to allow changing the alpha value
  • Method Details

    • renderWidget

      public void renderWidget(@NotNull @NotNull net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float delta)
      Overrides:
      renderWidget in class net.uku3lig.ukulib.config.option.widget.TextInputWidget