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, valueFields inherited from class net.minecraft.client.gui.widget.ClickableWidget
active, alpha, height, hovered, visible, width -
Constructor Summary
ConstructorsConstructorDescriptionDoubleSlider(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
Methods inherited from class net.minecraft.client.gui.widget.SliderWidget
appendClickableNarrations, getNarrationMessage, keyPressed, onClick, onDrag, onRelease, playDownSound, renderWidget, setFocusedMethods 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, isInteractable, isMouseOver, isSelected, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, playClickSound, render, setAlpha, setDimensions, setDimensionsAndPosition, setHeight, setMessage, setNavigationOrder, setTooltip, setTooltipDelay, setWidth, setX, setYMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
charTyped, getBorder, getFocusedPath, isClickable, keyReleased, mouseMoved, mouseScrolledMethods inherited from interface net.minecraft.client.gui.Selectable
getNarratedPartsMethods 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 textvalueToText- The function that converts the value to human-readable textinitialValue- The initial valuemin- The minimum valuemax- The maximum valuestep- The step between each valuesetter- The callback for the modified valuetooltipFactory- The tooltip factoryx- The x position of the widgety- The y position of the widgetwidth- The width of the widgetheight- The height of the widget
-
-
Method Details
-
updateMessage
protected void updateMessage()- Specified by:
updateMessagein classnet.minecraft.client.gui.widget.SliderWidget
-
applyValue
protected void applyValue()- Specified by:
applyValuein classnet.minecraft.client.gui.widget.SliderWidget
-