Package net.minecraft.client.gui.widget
Class AbstractSlider
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.widget.Widget
-
- net.minecraft.client.gui.widget.AbstractSlider
-
- All Implemented Interfaces:
IGuiEventListener
,IRenderable
- Direct Known Subclasses:
GameSettingsSlider
,RealmsSlotOptionsScreen.SettingsSlider
public abstract class AbstractSlider extends Widget
-
-
Field Summary
Fields Modifier and Type Field Description protected double
value
-
Fields inherited from class net.minecraft.client.gui.widget.Widget
active, alpha, height, isHovered, nextNarration, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, y
-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Constructor Description AbstractSlider(int p_i232253_1_, int p_i232253_2_, int p_i232253_3_, int p_i232253_4_, ITextComponent p_i232253_5_, double p_i232253_6_)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
applyValue()
protected IFormattableTextComponent
createNarrationMessage()
protected int
getYImage(boolean p_230989_1_)
boolean
keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
void
onClick(double p_230982_1_, double p_230982_3_)
protected void
onDrag(double p_230983_1_, double p_230983_3_, double p_230983_5_, double p_230983_7_)
void
onRelease(double p_231000_1_, double p_231000_3_)
void
playDownSound(SoundHandler p_230988_1_)
protected void
renderBg(MatrixStack p_230441_1_, Minecraft p_230441_2_, int p_230441_3_, int p_230441_4_)
private void
setValue(double p_230980_1_)
private void
setValueFromMouse(double p_230973_1_)
protected abstract void
updateMessage()
-
Methods inherited from class net.minecraft.client.gui.widget.Widget
changeFocus, clearFGColor, clicked, getFGColor, getHeight, getMessage, getWidth, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onFocusedChanged, queueNarration, render, renderButton, renderToolTip, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidth
-
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, 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.IGuiEventListener
charTyped, keyReleased, mouseMoved, mouseScrolled
-
-
-
-
Constructor Detail
-
AbstractSlider
public AbstractSlider(int p_i232253_1_, int p_i232253_2_, int p_i232253_3_, int p_i232253_4_, ITextComponent p_i232253_5_, double p_i232253_6_)
-
-
Method Detail
-
createNarrationMessage
protected IFormattableTextComponent createNarrationMessage()
- Overrides:
createNarrationMessage
in classWidget
-
renderBg
protected void renderBg(MatrixStack p_230441_1_, Minecraft p_230441_2_, int p_230441_3_, int p_230441_4_)
-
onClick
public void onClick(double p_230982_1_, double p_230982_3_)
-
keyPressed
public boolean keyPressed(int p_231046_1_, int p_231046_2_, int p_231046_3_)
-
setValueFromMouse
private void setValueFromMouse(double p_230973_1_)
-
setValue
private void setValue(double p_230980_1_)
-
onDrag
protected void onDrag(double p_230983_1_, double p_230983_3_, double p_230983_5_, double p_230983_7_)
-
playDownSound
public void playDownSound(SoundHandler p_230988_1_)
- Overrides:
playDownSound
in classWidget
-
onRelease
public void onRelease(double p_231000_1_, double p_231000_3_)
-
updateMessage
protected abstract void updateMessage()
-
applyValue
protected abstract void applyValue()
-
-