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:
Drawable
,Element
,Narratable
,Navigable
,Selectable
,Widget
- Direct Known Subclasses:
OptionSliderWidget
,RealmsSlotOptionsScreen.SettingsSlider
- Mappings:
Namespace Name official enx
intermediary net/minecraft/class_357
named net/minecraft/client/gui/widget/SliderWidget
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.Selectable
Selectable.SelectionType
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
private boolean
private static final Identifier
protected double
Fields inherited from class net.minecraft.client.gui.widget.ClickableWidget
ACCESSIBILITY_TEXTURE, active, alpha, height, hovered, visible, WIDGETS_TEXTURE, width
Fields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, LIGHT_DIRT_BACKGROUND_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
Fields inherited from interface net.minecraft.client.gui.Element
MAX_DOUBLE_CLICK_INTERVAL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
protected abstract void
protected MutableText
private int
private int
boolean
keyPressed
(int keyCode, int scanCode, int modifiers) Callback for when a key down event has been captured.void
onClick
(double mouseX, double mouseY) protected void
onDrag
(double mouseX, double mouseY, double deltaX, double deltaY) void
onRelease
(double mouseX, double mouseY) void
playDownSound
(SoundManager soundManager) void
renderButton
(MatrixStack matrices, int mouseX, int mouseY, float delta) void
setFocused
(boolean focused) private void
setValue
(double value) private void
setValueFromMouse
(double mouseX) Sets the value from mouse position.protected abstract void
Methods inherited from class net.minecraft.client.gui.widget.ClickableWidget
appendDefaultNarrations, appendNarrations, clicked, drawScrollableText, drawScrollableText, drawTexture, forEachChild, getHeight, getMessage, getNarrationMessage, getNavigationFocus, getNavigationOrder, getNavigationPath, getTooltipPositioner, getType, getWidth, getX, getY, isFocused, isHovered, isMouseOver, isNarratable, isSelected, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, render, setAlpha, setMessage, setNavigationOrder, setTooltip, setTooltipDelay, setWidth, setX, setY
Methods inherited from class net.minecraft.client.gui.DrawableHelper
disableScissor, drawBorder, drawCenteredTextWithShadow, drawCenteredTextWithShadow, drawCenteredTextWithShadow, drawHorizontalLine, drawNineSlicedTexture, drawNineSlicedTexture, drawNineSlicedTexture, drawRepeatingTexture, drawSprite, drawSprite, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawTextWithShadow, drawTextWithShadow, drawVerticalLine, drawWithOutline, enableScissor, fill, fill, fillGradient, fillGradient, fillGradient
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, getFocusedPath, keyReleased, mouseMoved, mouseScrolled
Methods inherited from interface net.minecraft.client.gui.widget.Widget
setPosition
-
Field Details
-
TEXTURE
- Mappings:
Namespace Name Mixin selector official a
Lenx;a:Ladd;
intermediary field_41787
Lnet/minecraft/class_357;field_41787:Lnet/minecraft/class_2960;
named TEXTURE
Lnet/minecraft/client/gui/widget/SliderWidget;TEXTURE:Lnet/minecraft/util/Identifier;
-
field_43051
protected static final int field_43051- See Also:
- Mappings:
Namespace Name Mixin selector official b
Lenx;b:I
intermediary field_43051
Lnet/minecraft/class_357;field_43051:I
named field_43051
Lnet/minecraft/client/gui/widget/SliderWidget;field_43051:I
-
field_43052
protected static final int field_43052- See Also:
- Mappings:
Namespace Name Mixin selector official c
Lenx;c:I
intermediary field_43052
Lnet/minecraft/class_357;field_43052:I
named field_43052
Lnet/minecraft/client/gui/widget/SliderWidget;field_43052:I
-
field_43102
protected static final int field_43102- See Also:
- Mappings:
Namespace Name Mixin selector official d
Lenx;d:I
intermediary field_43102
Lnet/minecraft/class_357;field_43102:I
named field_43102
Lnet/minecraft/client/gui/widget/SliderWidget;field_43102:I
-
field_43103
protected static final int field_43103- See Also:
- Mappings:
Namespace Name Mixin selector official e
Lenx;e:I
intermediary field_43103
Lnet/minecraft/class_357;field_43103:I
named field_43103
Lnet/minecraft/client/gui/widget/SliderWidget;field_43103:I
-
field_43054
protected static final int field_43054- See Also:
- Mappings:
Namespace Name Mixin selector official f
Lenx;f:I
intermediary field_43054
Lnet/minecraft/class_357;field_43054:I
named field_43054
Lnet/minecraft/client/gui/widget/SliderWidget;field_43054:I
-
field_41788
private static final int field_41788- See Also:
- Mappings:
Namespace Name Mixin selector official l
Lenx;l:I
intermediary field_41788
Lnet/minecraft/class_357;field_41788:I
named field_41788
Lnet/minecraft/client/gui/widget/SliderWidget;field_41788:I
-
field_41789
private static final int field_41789- See Also:
- Mappings:
Namespace Name Mixin selector official m
Lenx;m:I
intermediary field_41789
Lnet/minecraft/class_357;field_41789:I
named field_41789
Lnet/minecraft/client/gui/widget/SliderWidget;field_41789:I
-
field_41790
private static final int field_41790- See Also:
- Mappings:
Namespace Name Mixin selector official n
Lenx;n:I
intermediary field_41790
Lnet/minecraft/class_357;field_41790:I
named field_41790
Lnet/minecraft/client/gui/widget/SliderWidget;field_41790:I
-
field_41792
private static final int field_41792- See Also:
- Mappings:
Namespace Name Mixin selector official o
Lenx;o:I
intermediary field_41792
Lnet/minecraft/class_357;field_41792:I
named field_41792
Lnet/minecraft/client/gui/widget/SliderWidget;field_41792:I
-
field_41793
private static final int field_41793- See Also:
- Mappings:
Namespace Name Mixin selector official p
Lenx;p:I
intermediary field_41793
Lnet/minecraft/class_357;field_41793:I
named field_41793
Lnet/minecraft/client/gui/widget/SliderWidget;field_41793:I
-
field_41794
private static final int field_41794- See Also:
- Mappings:
Namespace Name Mixin selector official y
Lenx;y:I
intermediary field_41794
Lnet/minecraft/class_357;field_41794:I
named field_41794
Lnet/minecraft/client/gui/widget/SliderWidget;field_41794:I
-
field_41795
private static final int field_41795- See Also:
- Mappings:
Namespace Name Mixin selector official z
Lenx;z:I
intermediary field_41795
Lnet/minecraft/class_357;field_41795:I
named field_41795
Lnet/minecraft/client/gui/widget/SliderWidget;field_41795:I
-
value
protected double value- Mappings:
Namespace Name Mixin selector official k
Lenx;k:D
intermediary field_22753
Lnet/minecraft/class_357;field_22753:D
named value
Lnet/minecraft/client/gui/widget/SliderWidget;value:D
-
sliderFocused
private boolean sliderFocused- Mappings:
Namespace Name Mixin selector official A
Lenx;A:Z
intermediary field_41796
Lnet/minecraft/class_357;field_41796:Z
named sliderFocused
Lnet/minecraft/client/gui/widget/SliderWidget;sliderFocused:Z
-
-
Constructor Details
-
SliderWidget
- Mappings:
Namespace Name Mixin selector official <init>
Lenx;<init>(IIIILtj;D)V
intermediary <init>
Lnet/minecraft/class_357;<init>(IIIILnet/minecraft/class_2561;D)V
named <init>
Lnet/minecraft/client/gui/widget/SliderWidget;<init>(IIIILnet/minecraft/text/Text;D)V
-
-
Method Details
-
getYImage
private int getYImage()- Mappings:
Namespace Name Mixin selector official e
Lenx;e()I
intermediary method_25356
Lnet/minecraft/class_357;method_25356()I
named getYImage
Lnet/minecraft/client/gui/widget/SliderWidget;getYImage()I
-
getTextureV
private int getTextureV()- Mappings:
Namespace Name Mixin selector official f
Lenx;f()I
intermediary method_48204
Lnet/minecraft/class_357;method_48204()I
named getTextureV
Lnet/minecraft/client/gui/widget/SliderWidget;getTextureV()I
-
getNarrationMessage
- Overrides:
getNarrationMessage
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official aH_
Lenz;aH_()Ltw;
intermediary method_25360
Lnet/minecraft/class_339;method_25360()Lnet/minecraft/class_5250;
named getNarrationMessage
Lnet/minecraft/client/gui/widget/ClickableWidget;getNarrationMessage()Lnet/minecraft/text/MutableText;
-
appendClickableNarrations
- Specified by:
appendClickableNarrations
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official a
Lenz;a(Lere;)V
intermediary method_47399
Lnet/minecraft/class_339;method_47399(Lnet/minecraft/class_6382;)V
named appendClickableNarrations
Lnet/minecraft/client/gui/widget/ClickableWidget;appendClickableNarrations(Lnet/minecraft/client/gui/screen/narration/NarrationMessageBuilder;)V
-
renderButton
- Specified by:
renderButton
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official b
Lenz;b(Lehe;IIF)V
intermediary method_48579
Lnet/minecraft/class_339;method_48579(Lnet/minecraft/class_4587;IIF)V
named renderButton
Lnet/minecraft/client/gui/widget/ClickableWidget;renderButton(Lnet/minecraft/client/util/math/MatrixStack;IIF)V
-
onClick
public void onClick(double mouseX, double mouseY) - Overrides:
onClick
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official a
Lenz;a(DD)V
intermediary method_25348
Lnet/minecraft/class_339;method_25348(DD)V
named onClick
Lnet/minecraft/client/gui/widget/ClickableWidget;onClick(DD)V
-
setFocused
public void setFocused(boolean focused) - Specified by:
setFocused
in interfaceElement
- Overrides:
setFocused
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official b_
Lepl;b_(Z)V
intermediary method_25365
Lnet/minecraft/class_364;method_25365(Z)V
named setFocused
Lnet/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 inGLFW
class.- Parameters:
keyCode
- the named key code of the event as described in theGLFW
classscanCode
- 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:
true
to indicate that the event handling is successful/valid- See Also:
- Mappings:
Namespace Name Mixin selector official a
Lepl;a(III)Z
intermediary method_25404
Lnet/minecraft/class_364;method_25404(III)Z
named keyPressed
Lnet/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 a
Lenx;a(D)V
intermediary method_25345
Lnet/minecraft/class_357;method_25345(D)V
named setValueFromMouse
Lnet/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 b
Lenx;b(D)V
intermediary method_25347
Lnet/minecraft/class_357;method_25347(D)V
named setValue
Lnet/minecraft/client/gui/widget/SliderWidget;setValue(D)V
-
onDrag
protected void onDrag(double mouseX, double mouseY, double deltaX, double deltaY) - Overrides:
onDrag
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official a
Lenz;a(DDDD)V
intermediary method_25349
Lnet/minecraft/class_339;method_25349(DDDD)V
named onDrag
Lnet/minecraft/client/gui/widget/ClickableWidget;onDrag(DDDD)V
-
playDownSound
- Overrides:
playDownSound
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official a
Lenz;a(Lfxj;)V
intermediary method_25354
Lnet/minecraft/class_339;method_25354(Lnet/minecraft/class_1144;)V
named playDownSound
Lnet/minecraft/client/gui/widget/ClickableWidget;playDownSound(Lnet/minecraft/client/sound/SoundManager;)V
-
onRelease
public void onRelease(double mouseX, double mouseY) - Overrides:
onRelease
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official b
Lenz;b(DD)V
intermediary method_25357
Lnet/minecraft/class_339;method_25357(DD)V
named onRelease
Lnet/minecraft/client/gui/widget/ClickableWidget;onRelease(DD)V
-
updateMessage
protected abstract void updateMessage()- Mappings:
Namespace Name Mixin selector official b
Lenx;b()V
intermediary method_25346
Lnet/minecraft/class_357;method_25346()V
named updateMessage
Lnet/minecraft/client/gui/widget/SliderWidget;updateMessage()V
-
applyValue
protected abstract void applyValue()- Mappings:
Namespace Name Mixin selector official a
Lenx;a()V
intermediary method_25344
Lnet/minecraft/class_357;method_25344()V
named applyValue
Lnet/minecraft/client/gui/widget/SliderWidget;applyValue()V
-