Package net.minecraft.client.gui.widget
Class SliderWidget
java.lang.Object
net.minecraft.client.gui.widget.ClickableWidget
net.minecraft.client.gui.widget.ClickableWidget.InactivityIndicatingWidget
net.minecraft.client.gui.widget.SliderWidget
- All Implemented Interfaces:
Drawable,Element,Narratable,Navigable,Selectable,Widget
- Direct Known Subclasses:
InputControlHandlers.NumberRangeInputControlHandler.RangeSliderWidget,OptionSliderWidget,RealmsSlotOptionsScreen.SettingsSlider
@Environment(CLIENT)
public abstract class SliderWidget
extends ClickableWidget.InactivityIndicatingWidget
- Mappings:
Namespace Name named net/minecraft/client/gui/widget/SliderWidgetintermediary net/minecraft/class_357official ghg
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.widget.ClickableWidget
ClickableWidget.InactivityIndicatingWidgetNested classes/interfaces inherited from interface net.minecraft.client.gui.Selectable
Selectable.SelectionType -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate static final intprotected static final intprotected static final intstatic final intprivate static final Identifierprivate static final Identifierprivate static final Identifierprotected booleanprivate static final Identifierprotected double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected abstract voidprivate Identifierprotected MutableTextprivate IdentifierbooleankeyPressed(KeyInput input) Callback for when a key down event has been captured.voidprotected voidvoidvoidplayDownSound(SoundManager soundManager) voidrenderWidget(DrawContext context, int mouseX, int mouseY, float deltaTicks) voidsetFocused(boolean focused) protected voidsetValue(double value) private voidsetValueFromMouse(Click click) Sets the value from mouse position.protected abstract voidMethods inherited from class net.minecraft.client.gui.widget.ClickableWidget.InactivityIndicatingWidget
getMessage, makeInactive, setMessageMethods inherited from class net.minecraft.client.gui.widget.ClickableWidget
appendDefaultNarrations, appendNarrations, drawTextWithMargin, forEachChild, getAlpha, getBottom, getHeight, getNarrationMessage, getNavigationFocus, getNavigationOrder, getNavigationPath, getRight, getType, getWidth, getX, getY, isFocused, isHovered, isInteractable, isMouseOver, isSelected, isValidClickButton, method_76256, mouseClicked, mouseDragged, mouseReleased, playClickSound, render, setAlpha, setDimensions, setDimensionsAndPosition, setHeight, 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
-
Field Details
-
TEXTURE
- Mappings:
Namespace Name Mixin selector named TEXTURELnet/minecraft/client/gui/widget/SliderWidget;TEXTURE:Lnet/minecraft/util/Identifier;intermediary field_45340Lnet/minecraft/class_357;field_45340:Lnet/minecraft/class_2960;official aLghg;a:Lamu;
-
HIGHLIGHTED_TEXTURE
- Mappings:
Namespace Name Mixin selector named HIGHLIGHTED_TEXTURELnet/minecraft/client/gui/widget/SliderWidget;HIGHLIGHTED_TEXTURE:Lnet/minecraft/util/Identifier;intermediary field_45341Lnet/minecraft/class_357;field_45341:Lnet/minecraft/class_2960;official nLghg;n:Lamu;
-
HANDLE_TEXTURE
- Mappings:
Namespace Name Mixin selector named HANDLE_TEXTURELnet/minecraft/client/gui/widget/SliderWidget;HANDLE_TEXTURE:Lnet/minecraft/util/Identifier;intermediary field_45342Lnet/minecraft/class_357;field_45342:Lnet/minecraft/class_2960;official oLghg;o:Lamu;
-
HANDLE_HIGHLIGHTED_TEXTURE
- Mappings:
Namespace Name Mixin selector named HANDLE_HIGHLIGHTED_TEXTURELnet/minecraft/client/gui/widget/SliderWidget;HANDLE_HIGHLIGHTED_TEXTURE:Lnet/minecraft/util/Identifier;intermediary field_45343Lnet/minecraft/class_357;field_45343:Lnet/minecraft/class_2960;official pLghg;p:Lamu;
-
field_43054
protected static final int field_43054- See Also:
- Mappings:
Namespace Name Mixin selector named field_43054Lnet/minecraft/client/gui/widget/SliderWidget;field_43054:Iintermediary field_43054Lnet/minecraft/class_357;field_43054:Iofficial bLghg;b:I
-
field_60708
public static final int field_60708- See Also:
- Mappings:
Namespace Name Mixin selector named field_60708Lnet/minecraft/client/gui/widget/SliderWidget;field_60708:Iintermediary field_60708Lnet/minecraft/class_357;field_60708:Iofficial cLghg;c:I
-
field_41790
protected static final int field_41790- See Also:
- Mappings:
Namespace Name Mixin selector named field_41790Lnet/minecraft/client/gui/widget/SliderWidget;field_41790:Iintermediary field_41790Lnet/minecraft/class_357;field_41790:Iofficial dLghg;d:I
-
field_41789
private static final int field_41789- See Also:
- Mappings:
Namespace Name Mixin selector named field_41789Lnet/minecraft/client/gui/widget/SliderWidget;field_41789:Iintermediary field_41789Lnet/minecraft/class_357;field_41789:Iofficial qLghg;q:I
-
value
protected double value- Mappings:
Namespace Name Mixin selector named valueLnet/minecraft/client/gui/widget/SliderWidget;value:Dintermediary field_22753Lnet/minecraft/class_357;field_22753:Dofficial eLghg;e:D
-
sliderFocused
protected boolean sliderFocused- Mappings:
Namespace Name Mixin selector named sliderFocusedLnet/minecraft/client/gui/widget/SliderWidget;sliderFocused:Zintermediary field_41796Lnet/minecraft/class_357;field_41796:Zofficial fLghg;f:Z
-
dragging
private boolean dragging- Mappings:
Namespace Name Mixin selector named draggingLnet/minecraft/client/gui/widget/SliderWidget;dragging:Zintermediary field_62464Lnet/minecraft/class_357;field_62464:Zofficial rLghg;r:Z
-
-
Constructor Details
-
SliderWidget
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/gui/widget/SliderWidget;<init>(IIIILnet/minecraft/text/Text;D)Vintermediary <init>Lnet/minecraft/class_357;<init>(IIIILnet/minecraft/class_2561;D)Vofficial <init>Lghg;<init>(IIIILyi;D)V
-
-
Method Details
-
getTexture
- Mappings:
Namespace Name Mixin selector named getTextureLnet/minecraft/client/gui/widget/SliderWidget;getTexture()Lnet/minecraft/util/Identifier;intermediary method_52716Lnet/minecraft/class_357;method_52716()Lnet/minecraft/class_2960;official dLghg;d()Lamu;
-
getHandleTexture
- Mappings:
Namespace Name Mixin selector named getHandleTextureLnet/minecraft/client/gui/widget/SliderWidget;getHandleTexture()Lnet/minecraft/util/Identifier;intermediary method_52717Lnet/minecraft/class_357;method_52717()Lnet/minecraft/class_2960;official eLghg;e()Lamu;
-
getNarrationMessage
- Overrides:
getNarrationMessagein classClickableWidget- Mappings:
Namespace Name Mixin selector named getNarrationMessageLnet/minecraft/client/gui/widget/ClickableWidget;getNarrationMessage()Lnet/minecraft/text/MutableText;intermediary method_25360Lnet/minecraft/class_339;method_25360()Lnet/minecraft/class_5250;official fLghj;f()Lyx;
-
appendClickableNarrations
- Specified by:
appendClickableNarrationsin classClickableWidget- Mappings:
Namespace Name Mixin selector named appendClickableNarrationsLnet/minecraft/client/gui/widget/ClickableWidget;appendClickableNarrations(Lnet/minecraft/client/gui/screen/narration/NarrationMessageBuilder;)Vintermediary method_47399Lnet/minecraft/class_339;method_47399(Lnet/minecraft/class_6382;)Vofficial aLghj;a(Lgnl;)V
-
renderWidget
- Specified by:
renderWidgetin classClickableWidget- Mappings:
Namespace Name Mixin selector named renderWidgetLnet/minecraft/client/gui/widget/ClickableWidget;renderWidget(Lnet/minecraft/client/gui/DrawContext;IIF)Vintermediary method_48579Lnet/minecraft/class_339;method_48579(Lnet/minecraft/class_332;IIF)Vofficial a_Lghj;a_(Lggy;IIF)V
-
onClick
- Overrides:
onClickin classClickableWidget- Mappings:
Namespace Name Mixin selector named onClickLnet/minecraft/client/gui/widget/ClickableWidget;onClick(Lnet/minecraft/client/gui/Click;Z)Vintermediary method_25348Lnet/minecraft/class_339;method_25348(Lnet/minecraft/class_11909;Z)Vofficial bLghj;b(Lgxi;Z)V
-
setFocused
public void setFocused(boolean focused) - Specified by:
setFocusedin interfaceElement- Overrides:
setFocusedin classClickableWidget- Mappings:
Namespace Name Mixin selector named setFocusedLnet/minecraft/client/gui/Element;setFocused(Z)Vintermediary method_25365Lnet/minecraft/class_364;method_25365(Z)Vofficial bLgku;b(Z)V
-
keyPressed
Callback for when a key down event has been captured. The key code is identified by the constants inGLFWclass.- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector named keyPressedLnet/minecraft/client/gui/Element;keyPressed(Lnet/minecraft/client/input/KeyInput;)Zintermediary method_25404Lnet/minecraft/class_364;method_25404(Lnet/minecraft/class_11908;)Zofficial aLgku;a(Lgxh;)Z
-
setValueFromMouse
Sets the value from mouse position.The value will be calculated from the position and the width of this slider.
- See Also:
- Mappings:
Namespace Name Mixin selector named setValueFromMouseLnet/minecraft/client/gui/widget/SliderWidget;setValueFromMouse(Lnet/minecraft/client/gui/Click;)Vintermediary method_25345Lnet/minecraft/class_357;method_25345(Lnet/minecraft/class_11909;)Vofficial cLghg;c(Lgxi;)V
-
setValue
protected void setValue(double value) - Parameters:
value- the new value; will be clamped to[0, 1]- Mappings:
Namespace Name Mixin selector named setValueLnet/minecraft/client/gui/widget/SliderWidget;setValue(D)Vintermediary method_25347Lnet/minecraft/class_357;method_25347(D)Vofficial aLghg;a(D)V
-
onDrag
- Overrides:
onDragin classClickableWidget- Mappings:
Namespace Name Mixin selector named onDragLnet/minecraft/client/gui/widget/ClickableWidget;onDrag(Lnet/minecraft/client/gui/Click;DD)Vintermediary method_25349Lnet/minecraft/class_339;method_25349(Lnet/minecraft/class_11909;DD)Vofficial bLghj;b(Lgxi;DD)V
-
playDownSound
- Overrides:
playDownSoundin classClickableWidget- Mappings:
Namespace Name Mixin selector named playDownSoundLnet/minecraft/client/gui/widget/ClickableWidget;playDownSound(Lnet/minecraft/client/sound/SoundManager;)Vintermediary method_25354Lnet/minecraft/class_339;method_25354(Lnet/minecraft/class_1144;)Vofficial aLghj;a(Limb;)V
-
onRelease
- Overrides:
onReleasein classClickableWidget- Mappings:
Namespace Name Mixin selector named onReleaseLnet/minecraft/client/gui/widget/ClickableWidget;onRelease(Lnet/minecraft/client/gui/Click;)Vintermediary method_25357Lnet/minecraft/class_339;method_25357(Lnet/minecraft/class_11909;)Vofficial aLghj;a(Lgxi;)V
-
updateMessage
protected abstract void updateMessage()- Mappings:
Namespace Name Mixin selector named updateMessageLnet/minecraft/client/gui/widget/SliderWidget;updateMessage()Vintermediary method_25346Lnet/minecraft/class_357;method_25346()Vofficial cLghg;c()V
-
applyValue
protected abstract void applyValue()- Mappings:
Namespace Name Mixin selector named applyValueLnet/minecraft/client/gui/widget/SliderWidget;applyValue()Vintermediary method_25344Lnet/minecraft/class_357;method_25344()Vofficial aLghg;a()V
-