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. |
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 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 used for this UILabel. |
FontRenderOptions |
getFontRendererOptions()
Gets the
FontRenderOptions used for this UILabel. |
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,
FontRenderOptions fro)
|
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, 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, setAlpha, setAnchor, setDisabled, setFocused, setHovered, setName, setParent, setPosition, setPosition, setSize, setTooltip, setTooltip, setVisible, setZIndex, toString, unregisterpublic static int SLIDER_WIDTH
protected GuiIcon iconBackground
protected GuiIcon sliderIcon
protected MalisisFont font
protected FontRenderOptions fro
FontRenderOptions to use for this UISlider. If null, uses GuiRenderer.getDefaultFontRendererOptions().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()
MalisisFont used for this UILabel.public FontRenderOptions getFontRendererOptions()
FontRenderOptions used for this UILabel.getFontRendererOptions in interface IGuiText<UISlider>public UISlider setFont(MalisisFont font, FontRenderOptions fro)
public 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