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 official excintermediary 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 intprivate static final intprotected static final intprivate static final Identifierprivate static final Identifierprivate static final Identifierprivate booleanprivate static final Identifierprotected doubleFields inherited from class net.minecraft.client.gui.widget.ClickableWidget
active, alpha, height, hovered, visible, widthFields inherited from interface net.minecraft.client.gui.Element
MAX_DOUBLE_CLICK_INTERVAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected abstract voidprivate Identifierprotected MutableTextprivate IdentifierbooleankeyPressed(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) voidrenderWidget(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, drawScrollableText, forEachChild, getBottom, getHeight, getMessage, getNarrationMessage, getNavigationFocus, getNavigationOrder, getNavigationPath, getRight, getTooltip, getType, getWidth, getX, getY, isFocused, isHovered, isMouseOver, isNarratable, isSelected, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, render, setAlpha, setDimensions, setDimensionsAndPosition, setHeight, 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 official aLexc;a:Lahg;intermediary field_45340Lnet/minecraft/class_357;field_45340:Lnet/minecraft/class_2960;named TEXTURELnet/minecraft/client/gui/widget/SliderWidget;TEXTURE:Lnet/minecraft/util/Identifier;
-
HIGHLIGHTED_TEXTURE
- Mappings:
Namespace Name Mixin selector official dLexc;d:Lahg;intermediary field_45341Lnet/minecraft/class_357;field_45341:Lnet/minecraft/class_2960;named HIGHLIGHTED_TEXTURELnet/minecraft/client/gui/widget/SliderWidget;HIGHLIGHTED_TEXTURE:Lnet/minecraft/util/Identifier;
-
HANDLE_TEXTURE
- Mappings:
Namespace Name Mixin selector official eLexc;e:Lahg;intermediary field_45342Lnet/minecraft/class_357;field_45342:Lnet/minecraft/class_2960;named HANDLE_TEXTURELnet/minecraft/client/gui/widget/SliderWidget;HANDLE_TEXTURE:Lnet/minecraft/util/Identifier;
-
HANDLE_HIGHLIGHTED_TEXTURE
- Mappings:
Namespace Name Mixin selector official fLexc;f:Lahg;intermediary field_45343Lnet/minecraft/class_357;field_45343:Lnet/minecraft/class_2960;named HANDLE_HIGHLIGHTED_TEXTURELnet/minecraft/client/gui/widget/SliderWidget;HANDLE_HIGHLIGHTED_TEXTURE:Lnet/minecraft/util/Identifier;
-
field_43054
protected static final int field_43054- See Also:
- Mappings:
Namespace Name Mixin selector official bLexc;b:Iintermediary field_43054Lnet/minecraft/class_357;field_43054:Inamed field_43054Lnet/minecraft/client/gui/widget/SliderWidget;field_43054:I
-
field_41790
private static final int field_41790- See Also:
- Mappings:
Namespace Name Mixin selector official mLexc;m:Iintermediary field_41790Lnet/minecraft/class_357;field_41790:Inamed field_41790Lnet/minecraft/client/gui/widget/SliderWidget;field_41790:I
-
field_41789
private static final int field_41789- See Also:
- Mappings:
Namespace Name Mixin selector official nLexc;n:Iintermediary field_41789Lnet/minecraft/class_357;field_41789:Inamed field_41789Lnet/minecraft/client/gui/widget/SliderWidget;field_41789:I
-
value
protected double value- Mappings:
Namespace Name Mixin selector official cLexc;c:Dintermediary field_22753Lnet/minecraft/class_357;field_22753:Dnamed valueLnet/minecraft/client/gui/widget/SliderWidget;value:D
-
sliderFocused
private boolean sliderFocused- Mappings:
Namespace Name Mixin selector official oLexc;o:Zintermediary field_41796Lnet/minecraft/class_357;field_41796:Znamed sliderFocusedLnet/minecraft/client/gui/widget/SliderWidget;sliderFocused:Z
-
-
Constructor Details
-
SliderWidget
- Mappings:
Namespace Name Mixin selector official <init>Lexc;<init>(IIIILvf;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
-
getTexture
- Mappings:
Namespace Name Mixin selector official dLexc;d()Lahg;intermediary method_52716Lnet/minecraft/class_357;method_52716()Lnet/minecraft/class_2960;named getTextureLnet/minecraft/client/gui/widget/SliderWidget;getTexture()Lnet/minecraft/util/Identifier;
-
getHandleTexture
- Mappings:
Namespace Name Mixin selector official eLexc;e()Lahg;intermediary method_52717Lnet/minecraft/class_357;method_52717()Lnet/minecraft/class_2960;named getHandleTextureLnet/minecraft/client/gui/widget/SliderWidget;getHandleTexture()Lnet/minecraft/util/Identifier;
-
getNarrationMessage
- Overrides:
getNarrationMessagein classClickableWidget- Mappings:
Namespace Name Mixin selector official aK_Lexe;aK_()Lvt;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 aLexe;a(Lfaz;)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
-
renderWidget
- Specified by:
renderWidgetin classClickableWidget- Mappings:
Namespace Name Mixin selector official bLexe;b(Lewu;IIF)Vintermediary method_48579Lnet/minecraft/class_339;method_48579(Lnet/minecraft/class_332;IIF)Vnamed renderWidgetLnet/minecraft/client/gui/widget/ClickableWidget;renderWidget(Lnet/minecraft/client/gui/DrawContext;IIF)V
-
onClick
public void onClick(double mouseX, double mouseY) - Overrides:
onClickin classClickableWidget- Mappings:
Namespace Name Mixin selector official aLexe;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 focused) - Specified by:
setFocusedin interfaceElement- Overrides:
setFocusedin classClickableWidget- Mappings:
Namespace Name Mixin selector official aLezb;a(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 aLezb;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 aLexc;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 bLexc;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 bLexe;b(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 aLexe;a(Lgje;)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 a_Lexe;a_(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 bLexc;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 aLexc;a()Vintermediary method_25344Lnet/minecraft/class_357;method_25344()Vnamed applyValueLnet/minecraft/client/gui/widget/SliderWidget;applyValue()V
-