public class UISlimScrollbar extends UIScrollBar
UIScrollBar.Type
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 int |
backgroundColor
Background color of the scroll.
|
protected int |
scrollColor
Scroll color
|
autoHide, disabledIcon, horizontalDisabledIcon, horizontalIcon, scrollHeight, scrollShape, scrollThickness, type, verticalDisabledIcon, verticalIcon
Constructor and Description |
---|
UISlimScrollbar(MalisisGui gui,
T parent,
UIScrollBar.Type type) |
Modifier and Type | Method and Description |
---|---|
protected void |
createShape(MalisisGui gui) |
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 . |
int |
getHeight()
Gets the height of this
UIComponent . |
int |
getWidth()
Gets the width of this
UIComponent . |
void |
onMouseOver(StateChangeEvent.HoveredStateChange event) |
void |
setColor(int scrollColor)
Sets the color of the scroll.
|
void |
setColor(int scrollColor,
int backgroundColor)
Sets the color of the scroll and the background.
|
protected void |
setPosition() |
addScrollbar, getLength, getOffset, getPropertyString, getScrollable, getScrollbar, hasVisibleOtherScrollbar, isHorizontal, onButtonPress, onContentUpdate, onDrag, onKeyTyped, onScrollWheel, scrollBy, scrollTo, setAutoHide, setLength, setScrollSize, updateScrollbars
addControlComponent, componentX, componentY, draw, fireEvent, getAlpha, getAnchor, getComponentAt, getGui, getName, getParent, getRawHeight, getRawWidth, getTooltip, getX, getY, getZIndex, isDisabled, isFocused, isHovered, isInsideBounds, isRelativeHeight, isRelativeWidth, isVisible, onAddedToScreen, onButtonRelease, onClick, onDoubleClick, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
draw, getComponentAt, getParent, setParent
protected int backgroundColor
protected int scrollColor
public UISlimScrollbar(MalisisGui gui, T parent, UIScrollBar.Type type)
protected void setPosition()
setPosition
in class UIScrollBar
protected void createShape(MalisisGui gui)
createShape
in class UIScrollBar
public int getWidth()
UIComponent
UIComponent
.getWidth
in class UIScrollBar
public int getHeight()
UIComponent
UIComponent
.getHeight
in class UIScrollBar
public void setColor(int scrollColor)
scrollColor
- the new colorpublic void setColor(int scrollColor, int backgroundColor)
scrollColor
- the scroll colorbackgroundColor
- the background colorpublic void drawBackground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponent
UIComponent
.drawBackground
in class UIScrollBar
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 UIScrollBar
renderer
- the renderermouseX
- the mouse xmouseY
- the mouse ypartialTick
- the partial tickpublic void onMouseOver(StateChangeEvent.HoveredStateChange event)