public class GuiSlider extends GuiButton
Modifier and Type | Class and Description |
---|---|
static interface |
GuiSlider.FormatHelper |
Modifier and Type | Field and Description |
---|---|
private GuiSlider.FormatHelper |
formatHelper |
boolean |
isMouseDown |
private float |
max |
private float |
min |
private java.lang.String |
name |
private GuiPageButtonList.GuiResponder |
responder |
private float |
sliderPosition |
BUTTON_TEXTURES, displayString, enabled, height, hovered, id, packedFGColour, visible, width, x, y
ICONS, OPTIONS_BACKGROUND, STAT_ICONS, zLevel
Constructor and Description |
---|
GuiSlider(GuiPageButtonList.GuiResponder guiResponder,
int idIn,
int x,
int y,
java.lang.String nameIn,
float minIn,
float maxIn,
float defaultValue,
GuiSlider.FormatHelper formatter) |
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
getDisplayString() |
protected int |
getHoverState(boolean mouseOver) |
float |
getSliderPosition() |
float |
getSliderValue() |
protected void |
mouseDragged(Minecraft mc,
int mouseX,
int mouseY) |
boolean |
mousePressed(Minecraft mc,
int mouseX,
int mouseY) |
void |
mouseReleased(int mouseX,
int mouseY) |
void |
setSliderPosition(float position) |
void |
setSliderValue(float value,
boolean notifyResponder) |
drawButton, drawButtonForegroundLayer, getButtonWidth, isMouseOver, playPressSound, setWidth
drawCenteredString, drawGradientRect, drawHorizontalLine, drawModalRectWithCustomSizedTexture, drawRect, drawScaledCustomSizeModalRect, drawString, drawTexturedModalRect, drawTexturedModalRect, drawTexturedModalRect, drawVerticalLine
private float sliderPosition
public boolean isMouseDown
private final java.lang.String name
private final float min
private final float max
private final GuiPageButtonList.GuiResponder responder
private GuiSlider.FormatHelper formatHelper
public GuiSlider(GuiPageButtonList.GuiResponder guiResponder, int idIn, int x, int y, java.lang.String nameIn, float minIn, float maxIn, float defaultValue, GuiSlider.FormatHelper formatter)
public float getSliderValue()
public void setSliderValue(float value, boolean notifyResponder)
public float getSliderPosition()
private java.lang.String getDisplayString()
protected int getHoverState(boolean mouseOver)
getHoverState
in class GuiButton
protected void mouseDragged(Minecraft mc, int mouseX, int mouseY)
mouseDragged
in class GuiButton
public void setSliderPosition(float position)
public boolean mousePressed(Minecraft mc, int mouseX, int mouseY)
mousePressed
in class GuiButton
public void mouseReleased(int mouseX, int mouseY)
mouseReleased
in class GuiButton