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
,Selectable
- Direct Known Subclasses:
OptionSliderWidget
,RealmsSlotOptionsScreen.SettingsSlider
- Mappings:
Namespace Name official dyx
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
Fields inherited from class net.minecraft.client.gui.widget.ClickableWidget
active, alpha, height, hovered, visible, WIDGETS_TEXTURE, width, x, y
Fields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendNarrations
(NarrationMessageBuilder builder) protected abstract void
protected MutableText
protected int
getYImage
(boolean hovered) 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) protected void
renderBackground
(MatrixStack matrices, MinecraftClient client, int mouseX, int mouseY) 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, changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getType, getWidth, isFocused, isHovered, isMouseOver, isNarratable, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, onFocusedChanged, render, renderButton, renderTooltip, setAlpha, setFocused, setMessage, setWidth
Methods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredText, drawCenteredText, drawCenteredTextWithShadow, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, drawWithOutline, drawWithShadow, fill, fillGradient, fillGradient, fillGradient, getZOffset, setZOffset
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, keyReleased, mouseMoved, mouseScrolled
-
Field Details
-
value
protected double value- Mappings:
Namespace Name Mixin selector official b
Ldyx;b:D
intermediary field_22753
Lnet/minecraft/class_357;field_22753:D
named value
Lnet/minecraft/client/gui/widget/SliderWidget;value:D
-
-
Constructor Details
-
SliderWidget
- Mappings:
Namespace Name Mixin selector official <init>
Ldyx;<init>(IIIILpz;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
protected int getYImage(boolean hovered) - Overrides:
getYImage
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official a
Ldyy;a(Z)I
intermediary method_25356
Lnet/minecraft/class_339;method_25356(Z)I
named getYImage
Lnet/minecraft/client/gui/widget/ClickableWidget;getYImage(Z)I
-
getNarrationMessage
- Overrides:
getNarrationMessage
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official aj_
Ldyy;aj_()Lqf;
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;
-
appendNarrations
- Mappings:
Namespace Name Mixin selector official a
Lebe;a(Lebd;)V
intermediary method_37020
Lnet/minecraft/class_6383;method_37020(Lnet/minecraft/class_6382;)V
named appendNarrations
Lnet/minecraft/client/gui/Narratable;appendNarrations(Lnet/minecraft/client/gui/screen/narration/NarrationMessageBuilder;)V
-
renderBackground
protected void renderBackground(MatrixStack matrices, MinecraftClient client, int mouseX, int mouseY) - Overrides:
renderBackground
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official a
Ldyy;a(Ldsj;Ldxo;II)V
intermediary method_25353
Lnet/minecraft/class_339;method_25353(Lnet/minecraft/class_4587;Lnet/minecraft/class_310;II)V
named renderBackground
Lnet/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:
onClick
in classClickableWidget
- Mappings:
Namespace Name Mixin selector official a
Ldyy;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
-
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
Ldzy;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
Ldyx;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
Ldyx;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
Ldyy;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
Ldyy;a(Lfdi;)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
Ldyy;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
Ldyx;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
Ldyx;a()V
intermediary method_25344
Lnet/minecraft/class_357;method_25344()V
named applyValue
Lnet/minecraft/client/gui/widget/SliderWidget;applyValue()V
-