Class AbstractSliderButton
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractSliderButton
- All Implemented Interfaces:
GuiEventListener
,Renderable
,TabOrderedElement
,LayoutElement
,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
Modifier and TypeFieldDescriptionprivate boolean
private static final int
private static final int
private static final ResourceLocation
private static final ResourceLocation
private static final ResourceLocation
private static final ResourceLocation
protected static final int
protected double
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, width
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 ResourceLocation
protected ResourceLocation
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_) void
renderWidget
(GuiGraphics p_283427_, int p_281447_, int p_282852_, float p_282409_) void
setFocused
(boolean p_265705_) private void
setValue
(double p_93612_) private void
setValueFromMouse
(double p_93586_) protected abstract void
void
updateWidgetNarration
(NarrationElementOutput p_168798_) Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, clicked, createTooltipPositioner, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getRectangle, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, render, renderScrollingString, renderScrollingString, renderScrollingString, setAlpha, setFGColor, setHeight, setMessage, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessage
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, getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolled
Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPosition
-
Field Details
-
SLIDER_SPRITE
-
HIGHLIGHTED_SPRITE
-
SLIDER_HANDLE_SPRITE
-
SLIDER_HANDLE_HIGHLIGHTED_SPRITE
-
TEXT_MARGIN
protected static final int TEXT_MARGIN- See Also:
-
HANDLE_WIDTH
private static final int HANDLE_WIDTH- See Also:
-
HANDLE_HALF_WIDTH
private static final int HANDLE_HALF_WIDTH- See Also:
-
value
protected double value -
canChangeValue
private boolean canChangeValue
-
-
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
-
getSprite
-
getHandleSprite
-
createNarrationMessage
- Overrides:
createNarrationMessage
in classAbstractWidget
-
updateWidgetNarration
- Specified by:
updateWidgetNarration
in classAbstractWidget
-
renderWidget
- Specified by:
renderWidget
in classAbstractWidget
-
onClick
public void onClick(double p_93588_, double p_93589_) - Overrides:
onClick
in classAbstractWidget
-
setFocused
public void setFocused(boolean p_265705_) - Specified by:
setFocused
in interfaceGuiEventListener
- Overrides:
setFocused
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()
-