All Implemented Interfaces:
IGuiEventListener, IRenderable

public class Slider extends ExtendedButton
This class is blatantly stolen from iChunUtils with permission.
Author:
iChun
  • Field Details

    • sliderValue

      public double sliderValue
      The value of this slider control.
    • dispString

      public ITextComponent dispString
    • dragging

      public boolean dragging
      Is this slider control being dragged.
    • showDecimal

      public boolean showDecimal
    • minValue

      public double minValue
    • maxValue

      public double maxValue
    • precision

      public int precision
    • parent

      @Nullable public Slider.ISlider parent
    • suffix

      public ITextComponent suffix
    • drawString

      public boolean drawString
  • Constructor Details

  • Method Details

    • getYImage

      public int getYImage(boolean par1)
      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 class Widget
    • renderBg

      protected void renderBg(MatrixStack mStack, Minecraft par1Minecraft, int par2, int par3)
      Fired when the mouse button is dragged. Equivalent of MouseListener.mouseDragged(MouseEvent e).
      Overrides:
      renderBg in class Widget
    • onClick

      public void onClick(double mouseX, double mouseY)
      Returns true if the mouse has been pressed on this control. Equivalent of MouseListener.mousePressed(MouseEvent e).
      Overrides:
      onClick in class AbstractButton
    • updateSlider

      public void updateSlider()
    • onRelease

      public void onRelease(double mouseX, double mouseY)
      Fired when the mouse button is released. Equivalent of MouseListener.mouseReleased(MouseEvent e).
      Overrides:
      onRelease in class Widget
    • getValueInt

      public int getValueInt()
    • getValue

      public double getValue()
    • setValue

      public void setValue(double d)