Class AbstractSliderButton
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractSliderButton
- All Implemented Interfaces:
GuiEventListener
,Widget
,NarratableEntry
,NarrationSupplier
- Direct Known Subclasses:
AbstractOptionSliderButton
,ForgeSlider
,RealmsSlotOptionsScreen.SettingsSlider
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
Field Summary
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, y
Fields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorDescriptionAbstractSliderButton
(int p_93579_, int p_93580_, int p_93581_, int p_93582_, Component p_93583_, double p_93584_) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
protected MutableComponent
protected int
getYImage
(boolean p_93607_) boolean
keyPressed
(int p_93596_, int p_93597_, int p_93598_) void
onClick
(double p_93588_, double p_93589_) protected void
onDrag
(double p_93591_, double p_93592_, double p_93593_, double p_93594_) void
onRelease
(double p_93609_, double p_93610_) void
playDownSound
(SoundManager p_93605_) protected void
private void
setValue
(double p_93612_) private void
setValueFromMouse
(double p_93586_) protected abstract void
void
updateNarration
(NarrationElementOutput p_168798_) Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
changeFocus, clearFGColor, clicked, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getWidth, isActive, isFocused, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, onFocusedChanged, render, renderButton, renderToolTip, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidth, wrapDefaultNarrationMessage
Methods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
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.components.events.GuiEventListener
charTyped, keyReleased, mouseMoved, mouseScrolled
-
Field Details
-
value
protected double value
-
-
Constructor Details
-
AbstractSliderButton
public AbstractSliderButton(int p_93579_, int p_93580_, int p_93581_, int p_93582_, Component p_93583_, double p_93584_)
-
-
Method Details
-
getYImage
protected int getYImage(boolean p_93607_) - Overrides:
getYImage
in classAbstractWidget
-
createNarrationMessage
- Overrides:
createNarrationMessage
in classAbstractWidget
-
updateNarration
-
renderBg
- Overrides:
renderBg
in classAbstractWidget
-
onClick
public void onClick(double p_93588_, double p_93589_) - Overrides:
onClick
in classAbstractWidget
-
keyPressed
public boolean keyPressed(int p_93596_, int p_93597_, int p_93598_) -
setValueFromMouse
private void setValueFromMouse(double p_93586_) -
setValue
private void setValue(double p_93612_) -
onDrag
protected void onDrag(double p_93591_, double p_93592_, double p_93593_, double p_93594_) - Overrides:
onDrag
in classAbstractWidget
-
playDownSound
- Overrides:
playDownSound
in classAbstractWidget
-
onRelease
public void onRelease(double p_93609_, double p_93610_) - Overrides:
onRelease
in classAbstractWidget
-
updateMessage
protected abstract void updateMessage() -
applyValue
protected abstract void applyValue()
-