Package net.minecraft.client.gui.widget
Class SliderWidget
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widget.ClickableWidget
net.minecraft.client.gui.widget.SliderWidget
- All Implemented Interfaces:
class_8021,Drawable,Element,Narratable,Selectable
- Direct Known Subclasses:
OptionSliderWidget,RealmsSlotOptionsScreen.SettingsSlider
- Mappings:
Namespace Name official eliintermediary net/minecraft/class_357named net/minecraft/client/gui/widget/SliderWidget
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.Selectable
Selectable.SelectionType -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Identifierprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate booleanprotected doubleFields inherited from class net.minecraft.client.gui.widget.ClickableWidget
active, alpha, field_41797, height, hovered, visible, WIDGETS_TEXTURE, widthFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTUREFields inherited from interface net.minecraft.client.gui.Element
MAX_DOUBLE_CLICK_INTERVAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected abstract voidprotected MutableTextprotected intbooleankeyPressed(int keyCode, int scanCode, int modifiers) Callback for when a key down event has been captured.protected Identifierprivate intvoidonClick(double mouseX, double mouseY) protected voidonDrag(double mouseX, double mouseY, double deltaX, double deltaY) voidonRelease(double mouseX, double mouseY) voidplayDownSound(SoundManager soundManager) protected voidrenderBackground(MatrixStack matrices, MinecraftClient client, int mouseX, int mouseY) voidsetFocused(boolean bool) private voidsetValue(double value) private voidsetValueFromMouse(double mouseX) Sets the value from mouse position.protected abstract voidMethods inherited from class net.minecraft.client.gui.widget.ClickableWidget
appendDefaultNarrations, appendNarrations, clicked, getHeight, getMessage, getNarrationMessage, getTooltipPositioner, getType, getWidth, getX, getY, isFocused, isHovered, isMouseOver, isNarratable, isValidClickButton, method_48202, method_48205, method_48206, mouseClicked, mouseDragged, mouseReleased, render, renderButton, setAlpha, setMessage, setTooltip, setTooltipDelay, setWidth, setX, setYMethods inherited from class net.minecraft.client.gui.DrawableHelper
disableScissor, drawCenteredText, drawCenteredText, drawCenteredTextWithShadow, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, drawWithOutline, drawWithShadow, enableScissor, fill, fillGradient, fillGradient, fillGradient, getZOffset, method_48196, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.class_8021
method_48229Methods inherited from interface net.minecraft.client.gui.Element
charTyped, keyReleased, method_48218, mouseMoved, mouseScrolled
-
Field Details
-
field_41787
- Mappings:
Namespace Name Mixin selector official aLeli;a:Lacm;intermediary field_41787Lnet/minecraft/class_357;field_41787:Lnet/minecraft/class_2960;named field_41787Lnet/minecraft/client/gui/widget/SliderWidget;field_41787:Lnet/minecraft/util/Identifier;
-
field_41788
private static final int field_41788- See Also:
- Mappings:
Namespace Name Mixin selector official cLeli;c:Iintermediary field_41788Lnet/minecraft/class_357;field_41788:Inamed field_41788Lnet/minecraft/client/gui/widget/SliderWidget;field_41788:I
-
field_41789
private static final int field_41789- See Also:
- Mappings:
Namespace Name Mixin selector official dLeli;d:Iintermediary field_41789Lnet/minecraft/class_357;field_41789:Inamed field_41789Lnet/minecraft/client/gui/widget/SliderWidget;field_41789:I
-
field_41790
private static final int field_41790- See Also:
- Mappings:
Namespace Name Mixin selector official eLeli;e:Iintermediary field_41790Lnet/minecraft/class_357;field_41790:Inamed field_41790Lnet/minecraft/client/gui/widget/SliderWidget;field_41790:I
-
field_41791
private static final int field_41791- See Also:
- Mappings:
Namespace Name Mixin selector official fLeli;f:Iintermediary field_41791Lnet/minecraft/class_357;field_41791:Inamed field_41791Lnet/minecraft/client/gui/widget/SliderWidget;field_41791:I
-
field_41792
private static final int field_41792- See Also:
- Mappings:
Namespace Name Mixin selector official rLeli;r:Iintermediary field_41792Lnet/minecraft/class_357;field_41792:Inamed field_41792Lnet/minecraft/client/gui/widget/SliderWidget;field_41792:I
-
field_41793
private static final int field_41793- See Also:
- Mappings:
Namespace Name Mixin selector official sLeli;s:Iintermediary field_41793Lnet/minecraft/class_357;field_41793:Inamed field_41793Lnet/minecraft/client/gui/widget/SliderWidget;field_41793:I
-
field_41794
private static final int field_41794- See Also:
- Mappings:
Namespace Name Mixin selector official tLeli;t:Iintermediary field_41794Lnet/minecraft/class_357;field_41794:Inamed field_41794Lnet/minecraft/client/gui/widget/SliderWidget;field_41794:I
-
field_41795
private static final int field_41795- See Also:
- Mappings:
Namespace Name Mixin selector official uLeli;u:Iintermediary field_41795Lnet/minecraft/class_357;field_41795:Inamed field_41795Lnet/minecraft/client/gui/widget/SliderWidget;field_41795:I
-
value
protected double value- Mappings:
Namespace Name Mixin selector official bLeli;b:Dintermediary field_22753Lnet/minecraft/class_357;field_22753:Dnamed valueLnet/minecraft/client/gui/widget/SliderWidget;value:D
-
field_41796
private boolean field_41796- Mappings:
Namespace Name Mixin selector official vLeli;v:Zintermediary field_41796Lnet/minecraft/class_357;field_41796:Znamed field_41796Lnet/minecraft/client/gui/widget/SliderWidget;field_41796:Z
-
-
Constructor Details
-
SliderWidget
- Mappings:
Namespace Name Mixin selector official <init>Leli;<init>(IIIILsu;D)Vintermediary <init>Lnet/minecraft/class_357;<init>(IIIILnet/minecraft/class_2561;D)Vnamed <init>Lnet/minecraft/client/gui/widget/SliderWidget;<init>(IIIILnet/minecraft/text/Text;D)V
-
-
Method Details
-
method_48203
- Overrides:
method_48203in classClickableWidget- Mappings:
Namespace Name Mixin selector official ar_Lelj;ar_()Lacm;intermediary method_48203Lnet/minecraft/class_339;method_48203()Lnet/minecraft/class_2960;named method_48203Lnet/minecraft/client/gui/widget/ClickableWidget;method_48203()Lnet/minecraft/util/Identifier;
-
getYImage
protected int getYImage()- Overrides:
getYImagein classClickableWidget- Mappings:
Namespace Name Mixin selector official as_Lelj;as_()Iintermediary method_25356Lnet/minecraft/class_339;method_25356()Inamed getYImageLnet/minecraft/client/gui/widget/ClickableWidget;getYImage()I
-
method_48204
private int method_48204()- Mappings:
Namespace Name Mixin selector official gLeli;g()Iintermediary method_48204Lnet/minecraft/class_357;method_48204()Inamed method_48204Lnet/minecraft/client/gui/widget/SliderWidget;method_48204()I
-
getNarrationMessage
- Overrides:
getNarrationMessagein classClickableWidget- Mappings:
Namespace Name Mixin selector official at_Lelj;at_()Lth;intermediary method_25360Lnet/minecraft/class_339;method_25360()Lnet/minecraft/class_5250;named getNarrationMessageLnet/minecraft/client/gui/widget/ClickableWidget;getNarrationMessage()Lnet/minecraft/text/MutableText;
-
appendClickableNarrations
- Specified by:
appendClickableNarrationsin classClickableWidget- Mappings:
Namespace Name Mixin selector official aLelj;a(Leoc;)Vintermediary method_47399Lnet/minecraft/class_339;method_47399(Lnet/minecraft/class_6382;)Vnamed appendClickableNarrationsLnet/minecraft/client/gui/widget/ClickableWidget;appendClickableNarrations(Lnet/minecraft/client/gui/screen/narration/NarrationMessageBuilder;)V
-
renderBackground
protected void renderBackground(MatrixStack matrices, MinecraftClient client, int mouseX, int mouseY) - Overrides:
renderBackgroundin classClickableWidget- Mappings:
Namespace Name Mixin selector official aLelj;a(Leer;Lejt;II)Vintermediary method_25353Lnet/minecraft/class_339;method_25353(Lnet/minecraft/class_4587;Lnet/minecraft/class_310;II)Vnamed renderBackgroundLnet/minecraft/client/gui/widget/ClickableWidget;renderBackground(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/MinecraftClient;II)V
-
onClick
public void onClick(double mouseX, double mouseY) - Overrides:
onClickin classClickableWidget- Mappings:
Namespace Name Mixin selector official aLelj;a(DD)Vintermediary method_25348Lnet/minecraft/class_339;method_25348(DD)Vnamed onClickLnet/minecraft/client/gui/widget/ClickableWidget;onClick(DD)V
-
setFocused
public void setFocused(boolean bool) - Specified by:
setFocusedin interfaceElement- Overrides:
setFocusedin classClickableWidget- Mappings:
Namespace Name Mixin selector official b_Lemq;b_(Z)Vintermediary method_25365Lnet/minecraft/class_364;method_25365(Z)Vnamed setFocusedLnet/minecraft/client/gui/Element;setFocused(Z)V
-
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers) Callback for when a key down event has been captured. The key code is identified by the constants inGLFWclass.- Parameters:
keyCode- the named key code of the event as described in theGLFWclassscanCode- the unique/platform-specific scan code of the keyboard inputmodifiers- a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)- Returns:
trueto indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector official aLemq;a(III)Zintermediary method_25404Lnet/minecraft/class_364;method_25404(III)Znamed keyPressedLnet/minecraft/client/gui/Element;keyPressed(III)Z
-
setValueFromMouse
private void setValueFromMouse(double mouseX) 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 official aLeli;a(D)Vintermediary method_25345Lnet/minecraft/class_357;method_25345(D)Vnamed setValueFromMouseLnet/minecraft/client/gui/widget/SliderWidget;setValueFromMouse(D)V
-
setValue
private void setValue(double value) - Parameters:
value- the new value; will be clamped to[0, 1]- Mappings:
Namespace Name Mixin selector official bLeli;b(D)Vintermediary method_25347Lnet/minecraft/class_357;method_25347(D)Vnamed setValueLnet/minecraft/client/gui/widget/SliderWidget;setValue(D)V
-
onDrag
protected void onDrag(double mouseX, double mouseY, double deltaX, double deltaY) - Overrides:
onDragin classClickableWidget- Mappings:
Namespace Name Mixin selector official aLelj;a(DDDD)Vintermediary method_25349Lnet/minecraft/class_339;method_25349(DDDD)Vnamed onDragLnet/minecraft/client/gui/widget/ClickableWidget;onDrag(DDDD)V
-
playDownSound
- Overrides:
playDownSoundin classClickableWidget- Mappings:
Namespace Name Mixin selector official aLelj;a(Lftp;)Vintermediary method_25354Lnet/minecraft/class_339;method_25354(Lnet/minecraft/class_1144;)Vnamed playDownSoundLnet/minecraft/client/gui/widget/ClickableWidget;playDownSound(Lnet/minecraft/client/sound/SoundManager;)V
-
onRelease
public void onRelease(double mouseX, double mouseY) - Overrides:
onReleasein classClickableWidget- Mappings:
Namespace Name Mixin selector official bLelj;b(DD)Vintermediary method_25357Lnet/minecraft/class_339;method_25357(DD)Vnamed onReleaseLnet/minecraft/client/gui/widget/ClickableWidget;onRelease(DD)V
-
updateMessage
protected abstract void updateMessage()- Mappings:
Namespace Name Mixin selector official bLeli;b()Vintermediary method_25346Lnet/minecraft/class_357;method_25346()Vnamed updateMessageLnet/minecraft/client/gui/widget/SliderWidget;updateMessage()V
-
applyValue
protected abstract void applyValue()- Mappings:
Namespace Name Mixin selector official aLeli;a()Vintermediary method_25344Lnet/minecraft/class_357;method_25344()Vnamed applyValueLnet/minecraft/client/gui/widget/SliderWidget;applyValue()V
-