Class DoubleSlider

java.lang.Object
net.minecraft.client.gui.widget.ClickableWidget
net.minecraft.client.gui.widget.SliderWidget
net.uku3lig.ukulib.config.option.widget.DoubleSlider
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

public class DoubleSlider extends net.minecraft.client.gui.widget.SliderWidget
Implementation of a slider widget for use in SliderOption.
See Also:
  • 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.SliderWidget

    field_43054, field_60708, value

    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
    DoubleSlider(net.minecraft.text.Text text, DoubleFunction<net.minecraft.text.Text> valueToText, double initialValue, double min, double max, double step, DoubleConsumer setter, net.minecraft.client.option.SimpleOption.TooltipFactory<Double> tooltipFactory, int x, int y, int width, int height)
    Constructs a new slider.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected void
     

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

    appendClickableNarrations, getNarrationMessage, keyPressed, onClick, onDrag, onRelease, playDownSound, renderWidget, setFocused

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

    appendDefaultNarrations, appendNarrations, drawScrollableText, drawScrollableText, drawScrollableText, forEachChild, getBottom, getHeight, getMessage, getNarrationMessage, getNavigationFocus, getNavigationOrder, getNavigationPath, getRight, getType, getWidth, getX, getY, isFocused, isHovered, isMouseOver, isNarratable, isSelected, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, playClickSound, render, setAlpha, setDimensions, setDimensionsAndPosition, 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.Element

    charTyped, 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

    • DoubleSlider

      public DoubleSlider(net.minecraft.text.Text text, DoubleFunction<net.minecraft.text.Text> valueToText, double initialValue, double min, double max, double step, DoubleConsumer setter, net.minecraft.client.option.SimpleOption.TooltipFactory<Double> tooltipFactory, int x, int y, int width, int height)
      Constructs a new slider.
      Parameters:
      text - The text
      valueToText - The function that converts the value to human-readable text
      initialValue - The initial value
      min - The minimum value
      max - The maximum value
      step - The step between each value
      setter - The callback for the modified value
      tooltipFactory - The tooltip factory
      x - The x position of the widget
      y - The y position of the widget
      width - The width of the widget
      height - The height of the widget
  • Method Details

    • updateMessage

      protected void updateMessage()
      Specified by:
      updateMessage in class net.minecraft.client.gui.widget.SliderWidget
    • applyValue

      protected void applyValue()
      Specified by:
      applyValue in class net.minecraft.client.gui.widget.SliderWidget