public class UISlider extends UIComponent<UISlider>
ITransformable.Alpha, ITransformable.Brightness, ITransformable.Color, ITransformable.Position<T>, ITransformable.Rotate, ITransformable.Scale, ITransformable.Size<T>, ITransformable.Translate
Modifier and Type | Field and Description |
---|---|
protected GuiIcon |
iconBackground |
static int |
SLIDER_WIDTH |
protected GuiIcon |
sliderIcon |
Constructor and Description |
---|
UISlider(MalisisGui gui,
int width,
float min,
float max) |
UISlider(MalisisGui gui,
int width,
float min,
float max,
java.lang.String label) |
Modifier and Type | Method and Description |
---|---|
void |
drawBackground(GuiRenderer renderer,
int mouseX,
int mouseY,
float partialTick)
Called first when drawing this
UIComponent . |
void |
drawForeground(GuiRenderer renderer,
int mouseX,
int mouseY,
float partialTick)
Called last when drawing this
UIComponent . |
boolean |
onClick(int x,
int y) |
boolean |
onDrag(int lastX,
int lastY,
int x,
int y,
MouseButton button) |
boolean |
onScrollWheel(int x,
int y,
int delta) |
void |
slideBy(float amount) |
void |
slideTo(float offset) |
void |
slideTo(int x) |
addControlComponent, componentX, componentY, draw, fireEvent, getAlpha, getAnchor, getComponentAt, getGui, getHeight, getName, getParent, getPropertyString, getRawHeight, getRawWidth, getTooltip, getWidth, getX, getY, getZIndex, isDisabled, isFocused, isHovered, isInsideBounds, isRelativeHeight, isRelativeWidth, isVisible, onAddedToScreen, onButtonPress, onButtonRelease, onDoubleClick, onKeyTyped, onMouseMove, onRightClick, parentX, parentY, register, relativeX, relativeY, removeAllControlComponents, removeControlComponent, screenX, screenY, setAlpha, setAnchor, setDisabled, setFocused, setHovered, setName, setParent, setPosition, setPosition, setSize, setTooltip, setTooltip, setVisible, setZIndex, toString, unregister
public static int SLIDER_WIDTH
protected GuiIcon iconBackground
protected GuiIcon sliderIcon
public UISlider(MalisisGui gui, int width, float min, float max, java.lang.String label)
public UISlider(MalisisGui gui, int width, float min, float max)
public boolean onClick(int x, int y)
onClick
in class UIComponent<UISlider>
public boolean onScrollWheel(int x, int y, int delta)
onScrollWheel
in class UIComponent<UISlider>
public boolean onDrag(int lastX, int lastY, int x, int y, MouseButton button)
onDrag
in class UIComponent<UISlider>
public void slideTo(int x)
public void slideTo(float offset)
public void slideBy(float amount)
public void drawBackground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponent
UIComponent
.drawBackground
in class UIComponent<UISlider>
renderer
- the renderermouseX
- the mouse xmouseY
- the mouse ypartialTick
- the partial tickpublic void drawForeground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponent
UIComponent
.drawForeground
in class UIComponent<UISlider>
renderer
- the renderermouseX
- the mouse xmouseY
- the mouse ypartialTick
- the partial tick