public class GuiSlider
extends net.minecraft.client.gui.GuiButton
| Constructor and Description |
|---|
GuiSlider(int id,
java.lang.String title,
float initialValue,
int xPos,
int yPos,
boolean repAsInt,
int repValue)
Constructs a new GuiSlider.
|
GuiSlider(int id,
java.lang.String title,
float initialValue,
int xPos,
int yPos,
boolean repAsInt,
int intValue,
boolean invert)
Constructs a new GuiSlider.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getHoverState(boolean p_146114_1_) |
float |
getSliderValue()
Retrieves the value of the slider.
|
protected void |
mouseDragged(net.minecraft.client.Minecraft mc,
int mouseX,
int mouseY) |
boolean |
mousePressed(net.minecraft.client.Minecraft mc,
int mouseX,
int mouseY) |
void |
mouseReleased(int mouseX,
int mouseY) |
void |
setSliderValue(float value)
Sets the value of the slider.
|
drawButton, func_146111_b, func_146113_a, func_146115_a, func_154310_c, getButtonWidthpublic GuiSlider(int id,
java.lang.String title,
float initialValue,
int xPos,
int yPos,
boolean repAsInt,
int repValue)
id: - The button ID for the slider.title: - The text to display on the slider.initialValue: - The initial value to set the slider at.xPos: - The X position to start rendering.yPos: - The Y position to start rendering.repAsInt: - Whether or not the value should be represented as an integer.repValue: - The total value to represent. For example if 100 us used, 15% of the
slider will show as 15, and if 1000 is used it will be 150.public GuiSlider(int id,
java.lang.String title,
float initialValue,
int xPos,
int yPos,
boolean repAsInt,
int intValue,
boolean invert)
id: - The button ID for the slider.title: - The text to display on the slider.initialValue: - The initial value to set the slider at.xPos: - The X position to start rendering.yPos: - The Y position to start rendering.repAsInt: - Whether or not the value should be represented as an integer.repValue: - The total value to represent. For example if 100 us used, 15% of the
slider will show as 15, and if 1000 is used it will be 150.invert: - Whether or not the value should be inverted.protected void mouseDragged(net.minecraft.client.Minecraft mc,
int mouseX,
int mouseY)
mouseDragged in class net.minecraft.client.gui.GuiButtonpublic boolean mousePressed(net.minecraft.client.Minecraft mc,
int mouseX,
int mouseY)
mousePressed in class net.minecraft.client.gui.GuiButtonpublic void mouseReleased(int mouseX,
int mouseY)
mouseReleased in class net.minecraft.client.gui.GuiButtonpublic int getHoverState(boolean p_146114_1_)
getHoverState in class net.minecraft.client.gui.GuiButtonpublic void setSliderValue(float value)
value: - The value to set.public float getSliderValue()