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

@Environment(CLIENT) public abstract class SliderWidget extends ClickableWidget
Mappings:
Namespace Name
official esm
intermediary net/minecraft/class_357
named net/minecraft/client/gui/widget/SliderWidget
  • Field Details

    • TEXTURE

      private static final Identifier TEXTURE
      Mappings:
      Namespace Name Mixin selector
      official a Lesm;a:Laew;
      intermediary field_45340 Lnet/minecraft/class_357;field_45340:Lnet/minecraft/class_2960;
      named TEXTURE Lnet/minecraft/client/gui/widget/SliderWidget;TEXTURE:Lnet/minecraft/util/Identifier;
    • HIGHLIGHTED_TEXTURE

      private static final Identifier HIGHLIGHTED_TEXTURE
      Mappings:
      Namespace Name Mixin selector
      official d Lesm;d:Laew;
      intermediary field_45341 Lnet/minecraft/class_357;field_45341:Lnet/minecraft/class_2960;
      named HIGHLIGHTED_TEXTURE Lnet/minecraft/client/gui/widget/SliderWidget;HIGHLIGHTED_TEXTURE:Lnet/minecraft/util/Identifier;
    • HANDLE_TEXTURE

      private static final Identifier HANDLE_TEXTURE
      Mappings:
      Namespace Name Mixin selector
      official e Lesm;e:Laew;
      intermediary field_45342 Lnet/minecraft/class_357;field_45342:Lnet/minecraft/class_2960;
      named HANDLE_TEXTURE Lnet/minecraft/client/gui/widget/SliderWidget;HANDLE_TEXTURE:Lnet/minecraft/util/Identifier;
    • HANDLE_HIGHLIGHTED_TEXTURE

      private static final Identifier HANDLE_HIGHLIGHTED_TEXTURE
      Mappings:
      Namespace Name Mixin selector
      official l Lesm;l:Laew;
      intermediary field_45343 Lnet/minecraft/class_357;field_45343:Lnet/minecraft/class_2960;
      named HANDLE_HIGHLIGHTED_TEXTURE Lnet/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 b Lesm;b:I
      intermediary field_43054 Lnet/minecraft/class_357;field_43054:I
      named field_43054 Lnet/minecraft/client/gui/widget/SliderWidget;field_43054:I
    • field_41790

      private static final int field_41790
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official m Lesm;m:I
      intermediary field_41790 Lnet/minecraft/class_357;field_41790:I
      named field_41790 Lnet/minecraft/client/gui/widget/SliderWidget;field_41790:I
    • field_41789

      private static final int field_41789
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official n Lesm;n:I
      intermediary field_41789 Lnet/minecraft/class_357;field_41789:I
      named field_41789 Lnet/minecraft/client/gui/widget/SliderWidget;field_41789:I
    • value

      protected double value
      Mappings:
      Namespace Name Mixin selector
      official c Lesm;c: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 o Lesm;o:Z
      intermediary field_41796 Lnet/minecraft/class_357;field_41796:Z
      named sliderFocused Lnet/minecraft/client/gui/widget/SliderWidget;sliderFocused:Z
  • Constructor Details

    • SliderWidget

      public SliderWidget(int x, int y, int width, int height, Text text, double value)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lesm;<init>(IIIILtl;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

    • getTexture

      private Identifier getTexture()
      Mappings:
      Namespace Name Mixin selector
      official e Lesm;e()Laew;
      intermediary method_52716 Lnet/minecraft/class_357;method_52716()Lnet/minecraft/class_2960;
      named getTexture Lnet/minecraft/client/gui/widget/SliderWidget;getTexture()Lnet/minecraft/util/Identifier;
    • getHandleTexture

      private Identifier getHandleTexture()
      Mappings:
      Namespace Name Mixin selector
      official f Lesm;f()Laew;
      intermediary method_52717 Lnet/minecraft/class_357;method_52717()Lnet/minecraft/class_2960;
      named getHandleTexture Lnet/minecraft/client/gui/widget/SliderWidget;getHandleTexture()Lnet/minecraft/util/Identifier;
    • getNarrationMessage

      protected MutableText getNarrationMessage()
      Overrides:
      getNarrationMessage in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official aE_ Leso;aE_()Lty;
      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

      public void appendClickableNarrations(NarrationMessageBuilder builder)
      Specified by:
      appendClickableNarrations in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official a Leso;a(Lewi;)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

      public void renderButton(DrawContext context, int mouseX, int mouseY, float delta)
      Specified by:
      renderButton in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official b Leso;b(Lesf;IIF)V
      intermediary method_48579 Lnet/minecraft/class_339;method_48579(Lnet/minecraft/class_332;IIF)V
      named renderButton Lnet/minecraft/client/gui/widget/ClickableWidget;renderButton(Lnet/minecraft/client/gui/DrawContext;IIF)V
    • onClick

      public void onClick(double mouseX, double mouseY)
      Overrides:
      onClick in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official a Leso;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 interface Element
      Overrides:
      setFocused in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official b_ Leuk;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 in GLFW class.
      Parameters:
      keyCode - the named key code of the event as described in the GLFW class
      scanCode - the unique/platform-specific scan code of the keyboard input
      modifiers - 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 Leuk;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 Lesm;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 Lesm;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 class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official b Leso;b(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

      public void playDownSound(SoundManager soundManager)
      Overrides:
      playDownSound in class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official a Leso;a(Lgdq;)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 class ClickableWidget
      Mappings:
      Namespace Name Mixin selector
      official b Leso;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 Lesm;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 Lesm;a()V
      intermediary method_25344 Lnet/minecraft/class_357;method_25344()V
      named applyValue Lnet/minecraft/client/gui/widget/SliderWidget;applyValue()V