public class UISlimScrollbar extends UIScrollBar
UIScrollBar.TypeITransformable.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 boolean |
fade
Whether the scrollbar should fade in/out
|
protected int |
scrollColor
Scroll color
|
autoHide, offsetX, offsetY, scrollHeight, scrollShape, scrollThickness, type| Constructor and Description |
|---|
UISlimScrollbar(MalisisGui gui,
T parent,
UIScrollBar.Type type) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createShape(MalisisGui gui)
Creates the shapes for this
UIScrollBar. |
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. |
boolean |
isFade() |
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.
|
void |
setFade(boolean fade) |
protected void |
setPosition()
Sets the scrollbar position.
|
getLength, getOffset, getPropertyString, getScrollable, getScrollbar, getZIndex, hasVisibleOtherScrollbar, isHorizontal, onButtonPress, onClick, onContentUpdate, onDrag, onKeyTyped, onScrollWheel, scrollBy, scrollTo, setAutoHide, setOffset, setScrollSize, updateScrollbaraddControlComponent, attachData, componentX, componentY, draw, fireEvent, getAlpha, getAnchor, getComponentAt, getData, getGui, getIconProvider, getName, getParent, getRawHeight, getRawWidth, getRenderer, getTooltip, getX, getY, isDisabled, isFocused, isHovered, isInsideBounds, isRelativeHeight, isRelativeWidth, isVisible, onAddedToScreen, onButtonRelease, onDoubleClick, 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, unregisterclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdraw, getComponentAt, getParent, setParentprotected int backgroundColor
protected int scrollColor
protected boolean fade
public UISlimScrollbar(MalisisGui gui, T parent, UIScrollBar.Type type)
public void setFade(boolean fade)
public boolean isFade()
protected void setPosition()
UIScrollBarsetPosition in class UIScrollBarprotected void createShape(MalisisGui gui)
UIScrollBarUIScrollBar.createShape in class UIScrollBargui - the guipublic int getWidth()
UIComponentUIComponent.getWidth in class UIScrollBarpublic int getHeight()
UIComponentUIComponent.getHeight in class UIScrollBarpublic 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)
UIComponentUIComponent.drawBackground in class UIScrollBarrenderer - 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 UIScrollBarrenderer - the renderermouseX - the mouse xmouseY - the mouse ypartialTick - the partial tickpublic void onMouseOver(StateChangeEvent.HoveredStateChange<?> event)