Package net.minecraft.client.gui.widget
Class SliderWidget
java.lang.Object
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 intermediary net/minecraft/class_357official eovnamed 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 intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprivate booleanprivate static final Identifierprotected doubleFields inherited from class net.minecraft.client.gui.widget.ClickableWidget
ACCESSIBILITY_TEXTURE, active, alpha, height, hovered, visible, WIDGETS_TEXTURE, widthFields inherited from interface net.minecraft.client.gui.Element
MAX_DOUBLE_CLICK_INTERVAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected abstract voidprotected MutableTextprivate intprivate intbooleankeyPressed(int keyCode, int scanCode, int modifiers) Callback for when a key down event has been captured.voidonClick(double mouseX, double mouseY) protected voidonDrag(double mouseX, double mouseY, double deltaX, double deltaY) voidonRelease(double mouseX, double mouseY) voidplayDownSound(SoundManager soundManager) voidrenderButton(DrawContext context, int mouseX, int mouseY, float delta) voidsetFocused(boolean focused) 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, drawScrollableText, drawScrollableText, drawTexture, forEachChild, getHeight, getMessage, getNarrationMessage, getNavigationFocus, getNavigationOrder, getNavigationPath, getTooltip, getTooltipPositioner, getType, getWidth, getX, getY, isFocused, isHovered, isMouseOver, isNarratable, isSelected, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, render, setAlpha, setMessage, 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, getFocusedPath, keyReleased, mouseMoved, mouseScrolledMethods inherited from interface net.minecraft.client.gui.widget.Widget
setPosition
-
Field Details
-
TEXTURE
- Mappings:
Namespace Name Mixin selector intermediary field_41787Lnet/minecraft/class_357;field_41787:Lnet/minecraft/class_2960;official aLeov;a:Lacq;named TEXTURELnet/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 intermediary field_43051Lnet/minecraft/class_357;field_43051:Iofficial bLeov;b:Inamed field_43051Lnet/minecraft/client/gui/widget/SliderWidget;field_43051:I
-
field_43052
protected static final int field_43052- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_43052Lnet/minecraft/class_357;field_43052:Iofficial cLeov;c:Inamed field_43052Lnet/minecraft/client/gui/widget/SliderWidget;field_43052:I
-
field_43102
protected static final int field_43102- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_43102Lnet/minecraft/class_357;field_43102:Iofficial dLeov;d:Inamed field_43102Lnet/minecraft/client/gui/widget/SliderWidget;field_43102:I
-
field_43103
protected static final int field_43103- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_43103Lnet/minecraft/class_357;field_43103:Iofficial eLeov;e:Inamed field_43103Lnet/minecraft/client/gui/widget/SliderWidget;field_43103:I
-
field_43054
protected static final int field_43054- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_43054Lnet/minecraft/class_357;field_43054:Iofficial fLeov;f:Inamed field_43054Lnet/minecraft/client/gui/widget/SliderWidget;field_43054:I
-
field_41788
private static final int field_41788- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_41788Lnet/minecraft/class_357;field_41788:Iofficial hLeov;h: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 intermediary field_41789Lnet/minecraft/class_357;field_41789:Iofficial iLeov;i: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 intermediary field_41790Lnet/minecraft/class_357;field_41790:Iofficial jLeov;j:Inamed field_41790Lnet/minecraft/client/gui/widget/SliderWidget;field_41790:I
-
field_41792
private static final int field_41792- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_41792Lnet/minecraft/class_357;field_41792:Iofficial kLeov;k: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 intermediary field_41793Lnet/minecraft/class_357;field_41793:Iofficial lLeov;l: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 intermediary field_41794Lnet/minecraft/class_357;field_41794:Iofficial uLeov;u: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 intermediary field_41795Lnet/minecraft/class_357;field_41795:Iofficial vLeov;v:Inamed field_41795Lnet/minecraft/client/gui/widget/SliderWidget;field_41795:I
-
value
protected double value- Mappings:
Namespace Name Mixin selector intermediary field_22753Lnet/minecraft/class_357;field_22753:Dofficial gLeov;g:Dnamed valueLnet/minecraft/client/gui/widget/SliderWidget;value:D
-
sliderFocused
private boolean sliderFocused- Mappings:
Namespace Name Mixin selector intermediary field_41796Lnet/minecraft/class_357;field_41796:Zofficial wLeov;w:Znamed sliderFocusedLnet/minecraft/client/gui/widget/SliderWidget;sliderFocused:Z
-
-
Constructor Details
-
SliderWidget
- Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_357;<init>(IIIILnet/minecraft/class_2561;D)Vofficial <init>Leov;<init>(IIIILsw;D)Vnamed <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 intermediary method_25356Lnet/minecraft/class_357;method_25356()Iofficial eLeov;e()Inamed getYImageLnet/minecraft/client/gui/widget/SliderWidget;getYImage()I
-
getTextureV
private int getTextureV()- Mappings:
Namespace Name Mixin selector intermediary method_48204Lnet/minecraft/class_357;method_48204()Iofficial fLeov;f()Inamed getTextureVLnet/minecraft/client/gui/widget/SliderWidget;getTextureV()I
-
getNarrationMessage
- Overrides:
getNarrationMessagein classClickableWidget- Mappings:
Namespace Name Mixin selector intermediary method_25360Lnet/minecraft/class_339;method_25360()Lnet/minecraft/class_5250;official aE_Leox;aE_()Ltj;named getNarrationMessageLnet/minecraft/client/gui/widget/ClickableWidget;getNarrationMessage()Lnet/minecraft/text/MutableText;
-
appendClickableNarrations
- Specified by:
appendClickableNarrationsin classClickableWidget- Mappings:
Namespace Name Mixin selector intermediary method_47399Lnet/minecraft/class_339;method_47399(Lnet/minecraft/class_6382;)Vofficial aLeox;a(Lesg;)Vnamed appendClickableNarrationsLnet/minecraft/client/gui/widget/ClickableWidget;appendClickableNarrations(Lnet/minecraft/client/gui/screen/narration/NarrationMessageBuilder;)V
-
renderButton
- Specified by:
renderButtonin classClickableWidget- Mappings:
Namespace Name Mixin selector intermediary method_48579Lnet/minecraft/class_339;method_48579(Lnet/minecraft/class_332;IIF)Vofficial bLeox;b(Leop;IIF)Vnamed renderButtonLnet/minecraft/client/gui/widget/ClickableWidget;renderButton(Lnet/minecraft/client/gui/DrawContext;IIF)V
-
onClick
public void onClick(double mouseX, double mouseY) - Overrides:
onClickin classClickableWidget- Mappings:
Namespace Name Mixin selector intermediary method_25348Lnet/minecraft/class_339;method_25348(DD)Vofficial aLeox;a(DD)Vnamed onClickLnet/minecraft/client/gui/widget/ClickableWidget;onClick(DD)V
-
setFocused
public void setFocused(boolean focused) - Specified by:
setFocusedin interfaceElement- Overrides:
setFocusedin classClickableWidget- Mappings:
Namespace Name Mixin selector intermediary method_25365Lnet/minecraft/class_364;method_25365(Z)Vofficial b_Leqk;b_(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 intermediary method_25404Lnet/minecraft/class_364;method_25404(III)Zofficial aLeqk;a(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 intermediary method_25345Lnet/minecraft/class_357;method_25345(D)Vofficial aLeov;a(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 intermediary method_25347Lnet/minecraft/class_357;method_25347(D)Vofficial bLeov;b(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 intermediary method_25349Lnet/minecraft/class_339;method_25349(DDDD)Vofficial aLeox;a(DDDD)Vnamed onDragLnet/minecraft/client/gui/widget/ClickableWidget;onDrag(DDDD)V
-
playDownSound
- Overrides:
playDownSoundin classClickableWidget- Mappings:
Namespace Name Mixin selector intermediary method_25354Lnet/minecraft/class_339;method_25354(Lnet/minecraft/class_1144;)Vofficial aLeox;a(Lfyr;)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 intermediary method_25357Lnet/minecraft/class_339;method_25357(DD)Vofficial bLeox;b(DD)Vnamed onReleaseLnet/minecraft/client/gui/widget/ClickableWidget;onRelease(DD)V
-
updateMessage
protected abstract void updateMessage()- Mappings:
Namespace Name Mixin selector intermediary method_25346Lnet/minecraft/class_357;method_25346()Vofficial bLeov;b()Vnamed updateMessageLnet/minecraft/client/gui/widget/SliderWidget;updateMessage()V
-
applyValue
protected abstract void applyValue()- Mappings:
Namespace Name Mixin selector intermediary method_25344Lnet/minecraft/class_357;method_25344()Vofficial aLeov;a()Vnamed applyValueLnet/minecraft/client/gui/widget/SliderWidget;applyValue()V
-