Package net.minecraft.client.gui.widget
Class SliderWidget
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widget.AbstractButtonWidget
net.minecraft.client.gui.widget.SliderWidget
- Direct Known Subclasses:
OptionSliderWidget
,RealmsSlotOptionsScreen.SettingsSlider
@Environment(CLIENT) public abstract class SliderWidget extends AbstractButtonWidget
- Mappings:
Namespace Name official drr
intermediary net/minecraft/class_357
named net/minecraft/client/gui/widget/SliderWidget
-
Field Summary
Fields Modifier and Type Field Description protected double
value
Fields inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
active, alpha, height, hovered, nextNarration, visible, WIDGETS_LOCATION, width, x, y
Fields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
-
Constructor Summary
Constructors Constructor Description SliderWidget(int x, int y, int width, int height, Text text, double value)
-
Method Summary
Modifier and Type Method Description protected abstract void
applyValue()
protected MutableText
getNarrationMessage()
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
renderBg(MatrixStack matrices, MinecraftClient client, int mouseX, int mouseY)
private void
setValue(double mouseX)
private void
setValueFromMouse(double mouseX)
protected abstract void
updateMessage()
Methods inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getWidth, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onFocusedChanged, queueNarration, render, renderButton, renderToolTip, setAlpha, setFocused, setMessage, setWidth
Methods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, method_33284, 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
Ldrr;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>
Ldrr;<init>(IIIILoi;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 classAbstractButtonWidget
- Mappings:
Namespace Name Mixin selector official a
Ldrs;a(Z)I
intermediary method_25356
Lnet/minecraft/class_339;method_25356(Z)I
named getYImage
Lnet/minecraft/client/gui/widget/AbstractButtonWidget;getYImage(Z)I
-
getNarrationMessage
- Overrides:
getNarrationMessage
in classAbstractButtonWidget
- Mappings:
Namespace Name Mixin selector official c
Ldrs;c()Loo;
intermediary method_25360
Lnet/minecraft/class_339;method_25360()Lnet/minecraft/class_5250;
named getNarrationMessage
Lnet/minecraft/client/gui/widget/AbstractButtonWidget;getNarrationMessage()Lnet/minecraft/text/MutableText;
-
renderBg
- Overrides:
renderBg
in classAbstractButtonWidget
- Mappings:
Namespace Name Mixin selector official a
Ldrs;a(Ldlr;Ldqk;II)V
intermediary method_25353
Lnet/minecraft/class_339;method_25353(Lnet/minecraft/class_4587;Lnet/minecraft/class_310;II)V
named renderBg
Lnet/minecraft/client/gui/widget/AbstractButtonWidget;renderBg(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/MinecraftClient;II)V
-
onClick
public void onClick(double mouseX, double mouseY)- Overrides:
onClick
in classAbstractButtonWidget
- Mappings:
Namespace Name Mixin selector official a
Ldrs;a(DD)V
intermediary method_25348
Lnet/minecraft/class_339;method_25348(DD)V
named onClick
Lnet/minecraft/client/gui/widget/AbstractButtonWidget;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:
Keyboard.onKey(long, int, int, int, int)
,GLFW.GLFW_KEY_Q
,GLFWKeyCallbackI.invoke(long, int, int, int, int)
- Mappings:
Namespace Name Mixin selector official a
Ldst;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)- Mappings:
Namespace Name Mixin selector official a
Ldrr;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 mouseX)- Mappings:
Namespace Name Mixin selector official b
Ldrr;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 classAbstractButtonWidget
- Mappings:
Namespace Name Mixin selector official a
Ldrs;a(DDDD)V
intermediary method_25349
Lnet/minecraft/class_339;method_25349(DDDD)V
named onDrag
Lnet/minecraft/client/gui/widget/AbstractButtonWidget;onDrag(DDDD)V
-
playDownSound
- Overrides:
playDownSound
in classAbstractButtonWidget
- Mappings:
Namespace Name Mixin selector official a
Ldrs;a(Levm;)V
intermediary method_25354
Lnet/minecraft/class_339;method_25354(Lnet/minecraft/class_1144;)V
named playDownSound
Lnet/minecraft/client/gui/widget/AbstractButtonWidget;playDownSound(Lnet/minecraft/client/sound/SoundManager;)V
-
onRelease
public void onRelease(double mouseX, double mouseY)- Overrides:
onRelease
in classAbstractButtonWidget
- Mappings:
Namespace Name Mixin selector official a_
Ldrs;a_(DD)V
intermediary method_25357
Lnet/minecraft/class_339;method_25357(DD)V
named onRelease
Lnet/minecraft/client/gui/widget/AbstractButtonWidget;onRelease(DD)V
-
updateMessage
protected abstract void updateMessage()- Mappings:
Namespace Name Mixin selector official b
Ldrr;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
Ldrr;a()V
intermediary method_25344
Lnet/minecraft/class_357;method_25344()V
named applyValue
Lnet/minecraft/client/gui/widget/SliderWidget;applyValue()V
-