Class ColorInputWidget

java.lang.Object
net.minecraft.client.gui.widget.ClickableWidget
net.uku3lig.ukulib.config.option.widget.TextInputWidget
net.uku3lig.ukulib.config.option.widget.ColorInputWidget
All Implemented Interfaces:
net.minecraft.client.gui.Drawable, net.minecraft.client.gui.Element, net.minecraft.client.gui.Narratable, net.minecraft.client.gui.navigation.Navigable, net.minecraft.client.gui.Selectable, net.minecraft.client.gui.widget.Widget, CheckedOption

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

    Nested classes/interfaces inherited from interface net.minecraft.client.gui.Selectable

    net.minecraft.client.gui.Selectable.SelectionType
  • Field Summary

    Fields inherited from class net.minecraft.client.gui.widget.ClickableWidget

    active, alpha, height, hovered, visible, width

    Fields inherited from interface net.minecraft.client.gui.Element

    MAX_DOUBLE_CLICK_INTERVAL
  • 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(net.minecraft.client.gui.DrawContext drawContext, int mouseX, int mouseY, float delta)
     

    Methods inherited from class net.minecraft.client.gui.widget.ClickableWidget

    appendDefaultNarrations, appendNarrations, drawScrollableText, drawScrollableText, drawScrollableText, forEachChild, getBottom, getHeight, getMessage, getNarrationMessage, getNavigationFocus, getNavigationOrder, getRight, getTooltip, getType, getWidth, getX, getY, isFocused, isHovered, isNarratable, isSelected, isValidClickButton, mouseDragged, mouseReleased, onClick, onDrag, onRelease, playClickSound, playDownSound, render, setAlpha, setDimensions, setDimensionsAndPosition, setFocused, setHeight, setMessage, setNavigationOrder, setTooltip, setTooltipDelay, setWidth, setX, setY

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.minecraft.client.gui.Drawable

    render

    Methods inherited from interface net.minecraft.client.gui.Element

    getBorder, getFocusedPath, keyReleased, mouseMoved, mouseScrolled

    Methods inherited from interface net.minecraft.client.gui.Selectable

    getNarratedParts

    Methods inherited from interface net.minecraft.client.gui.widget.Widget

    setPosition
  • 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(net.minecraft.client.gui.DrawContext drawContext, int mouseX, int mouseY, float delta)
      Overrides:
      renderWidget in class TextInputWidget