public class UISlider extends UIComponent<UISlider> implements IGuiText<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 MalisisFont |
font
The
MalisisFont to use for this UISlider. |
protected FontRenderOptions |
fro
The
FontRenderOptions to use for this UISlider. |
protected FontRenderOptions |
hoveredFro
The
FontRenderOptions to use for this UISlider when hovered. |
static int |
SLIDER_WIDTH |
protected GuiIconProvider |
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 text) |
| 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. |
MalisisFont |
getFont()
Gets the
MalisisFont. |
FontRenderOptions |
getFontRenderOptions()
Gets the
FontRenderOptions. |
boolean |
onClick(int x,
int y)
On click.
|
boolean |
onDrag(int lastX,
int lastY,
int x,
int y,
MouseButton button)
On drag.
|
boolean |
onScrollWheel(int x,
int y,
int delta)
On scroll wheel.
|
UISlider |
setFont(MalisisFont font)
Sets the
MalisisFont. |
UISlider |
setFontRenderOptions(FontRenderOptions fro)
Sets the
FontRenderOptions. |
void |
slideBy(float amount) |
void |
slideTo(float offset) |
void |
slideTo(int x) |
addControlComponent, attachData, componentX, componentY, draw, fireEvent, getAlpha, getAnchor, getComponentAt, getData, getGui, getHeight, getIconProvider, getName, getParent, getPropertyString, getRawHeight, getRawWidth, getRenderer, 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, self, setAlpha, setAnchor, setDisabled, setFocused, setHovered, setName, setParent, setPosition, setPosition, setSize, setTooltip, setTooltip, setVisible, setZIndex, toString, unregisterpublic static int SLIDER_WIDTH
protected GuiIconProvider sliderIcon
protected MalisisFont font
MalisisFont to use for this UISlider.protected FontRenderOptions fro
FontRenderOptions to use for this UISlider.protected FontRenderOptions hoveredFro
FontRenderOptions to use for this UISlider when hovered.public UISlider(MalisisGui gui, int width, float min, float max, java.lang.String text)
public UISlider(MalisisGui gui, int width, float min, float max)
public MalisisFont getFont()
IGuiTextMalisisFont.public UISlider setFont(MalisisFont font)
IGuiTextMalisisFont.public FontRenderOptions getFontRenderOptions()
IGuiTextFontRenderOptions.getFontRenderOptions in interface IGuiText<UISlider>public UISlider setFontRenderOptions(FontRenderOptions fro)
IGuiTextFontRenderOptions.setFontRenderOptions in interface IGuiText<UISlider>fro - the fropublic boolean onClick(int x,
int y)
UIComponentonClick in class UIComponent<UISlider>x - the xy - the ypublic boolean onScrollWheel(int x,
int y,
int delta)
UIComponentonScrollWheel in class UIComponent<UISlider>x - the xy - the ydelta - the deltapublic boolean onDrag(int lastX,
int lastY,
int x,
int y,
MouseButton button)
UIComponentonDrag in class UIComponent<UISlider>lastX - the last xlastY - the last yx - the xy - the ybutton - the buttonpublic 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)
UIComponentUIComponent.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)
UIComponentUIComponent.drawForeground in class UIComponent<UISlider>renderer - the renderermouseX - the mouse xmouseY - the mouse ypartialTick - the partial tick