Class Slider
- All Implemented Interfaces:
GuiEventListener
,Widget
,NarratableEntry
,NarrationSupplier
Deprecated, for removal: This API element is subject to removal in a future version.
This class is blatantly stolen from iChunUtils with permission.
- Author:
- iChun
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Deprecated, for removal: This API element is subject to removal in a future version.Nested classes/interfaces inherited from class net.minecraft.client.gui.components.Button
Button.OnPress, Button.OnTooltip
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
Field Summary
Modifier and TypeFieldDescriptionDeprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.Is this slider control being dragged.boolean
Deprecated, for removal: This API element is subject to removal in a future version.double
Deprecated, for removal: This API element is subject to removal in a future version.double
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.int
Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.double
Deprecated, for removal: This API element is subject to removal in a future version.The value of this slider control.Deprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class net.minecraft.client.gui.components.Button
NO_TOOLTIP, onPress, onTooltip
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
ConstructorDescriptionSlider
(int xPos, int yPos, int width, int height, Component prefix, Component suf, double minVal, double maxVal, double currentVal, boolean showDec, boolean drawStr, Button.OnPress handler) Deprecated, for removal: This API element is subject to removal in a future version.Slider
(int xPos, int yPos, int width, int height, Component prefix, Component suf, double minVal, double maxVal, double currentVal, boolean showDec, boolean drawStr, Button.OnPress handler, Slider.ISlider par) Deprecated, for removal: This API element is subject to removal in a future version.Slider
(int xPos, int yPos, Component displayStr, double minVal, double maxVal, double currentVal, Button.OnPress handler, Slider.ISlider par) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getValue()
Deprecated, for removal: This API element is subject to removal in a future version.int
Deprecated, for removal: This API element is subject to removal in a future version.int
getYImage
(boolean par1) Deprecated, for removal: This API element is subject to removal in a future version.Returns 0 if the button is disabled, 1 if the mouse is NOT hovering over this button and 2 if it IS hovering over this button.void
onClick
(double mouseX, double mouseY) Deprecated, for removal: This API element is subject to removal in a future version.Returns true if the mouse has been pressed on this control.void
onRelease
(double mouseX, double mouseY) Deprecated, for removal: This API element is subject to removal in a future version.Fired when the mouse button is released.protected void
Deprecated, for removal: This API element is subject to removal in a future version.Fired when the mouse button is dragged.void
setValue
(double d) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class net.minecraftforge.client.gui.widget.ExtendedButton
renderButton
Methods inherited from class net.minecraft.client.gui.components.Button
onPress, renderToolTip, updateNarration
Methods inherited from class net.minecraft.client.gui.components.AbstractButton
keyPressed
Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
changeFocus, clearFGColor, clicked, createNarrationMessage, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getWidth, isActive, isFocused, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, onDrag, onFocusedChanged, playDownSound, render, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidth, wrapDefaultNarrationMessage
Methods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, 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
-
sliderValue
public double sliderValueDeprecated, for removal: This API element is subject to removal in a future version.The value of this slider control. -
dispString
Deprecated, for removal: This API element is subject to removal in a future version. -
dragging
public boolean draggingDeprecated, for removal: This API element is subject to removal in a future version.Is this slider control being dragged. -
showDecimal
public boolean showDecimalDeprecated, for removal: This API element is subject to removal in a future version. -
minValue
public double minValueDeprecated, for removal: This API element is subject to removal in a future version. -
maxValue
public double maxValueDeprecated, for removal: This API element is subject to removal in a future version. -
precision
public int precisionDeprecated, for removal: This API element is subject to removal in a future version. -
parent
Deprecated, for removal: This API element is subject to removal in a future version. -
suffix
Deprecated, for removal: This API element is subject to removal in a future version. -
drawString
public boolean drawStringDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
Slider
public Slider(int xPos, int yPos, int width, int height, Component prefix, Component suf, double minVal, double maxVal, double currentVal, boolean showDec, boolean drawStr, Button.OnPress handler) Deprecated, for removal: This API element is subject to removal in a future version. -
Slider
public Slider(int xPos, int yPos, int width, int height, Component prefix, Component suf, double minVal, double maxVal, double currentVal, boolean showDec, boolean drawStr, Button.OnPress handler, @Nullable Slider.ISlider par) Deprecated, for removal: This API element is subject to removal in a future version. -
Slider
public Slider(int xPos, int yPos, Component displayStr, double minVal, double maxVal, double currentVal, Button.OnPress handler, Slider.ISlider par) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getYImage
public int getYImage(boolean par1) Deprecated, for removal: This API element is subject to removal in a future version.Returns 0 if the button is disabled, 1 if the mouse is NOT hovering over this button and 2 if it IS hovering over this button.- Overrides:
getYImage
in classAbstractWidget
-
renderBg
Deprecated, for removal: This API element is subject to removal in a future version.Fired when the mouse button is dragged. Equivalent of MouseListener.mouseDragged(MouseEvent e).- Overrides:
renderBg
in classAbstractWidget
-
onClick
public void onClick(double mouseX, double mouseY) Deprecated, for removal: This API element is subject to removal in a future version.Returns true if the mouse has been pressed on this control. Equivalent of MouseListener.mousePressed(MouseEvent e).- Overrides:
onClick
in classAbstractButton
-
updateSlider
public void updateSlider()Deprecated, for removal: This API element is subject to removal in a future version. -
onRelease
public void onRelease(double mouseX, double mouseY) Deprecated, for removal: This API element is subject to removal in a future version.Fired when the mouse button is released. Equivalent of MouseListener.mouseReleased(MouseEvent e).- Overrides:
onRelease
in classAbstractWidget
-
getValueInt
public int getValueInt()Deprecated, for removal: This API element is subject to removal in a future version. -
getValue
public double getValue()Deprecated, for removal: This API element is subject to removal in a future version. -
setValue
public void setValue(double d) Deprecated, for removal: This API element is subject to removal in a future version.
-
ForgeSlider
instead.