public class ComponentScrollBar extends GuiComponent
| Modifier and Type | Field and Description |
|---|---|
protected BoundBox |
hoverArea |
protected int |
max |
protected int |
number |
protected java.util.function.Consumer<java.lang.Integer> |
scrollConsumer |
protected boolean |
wasMouseDown |
| Constructor and Description |
|---|
ComponentScrollBar(Gui gui,
int x,
int y,
int height,
BoundBox hoverArea,
int max,
java.util.function.Consumer<java.lang.Integer> scrollConsumer) |
| Modifier and Type | Method and Description |
|---|---|
BoundBox |
getHoverArea() |
int |
getMax() |
IResourceName |
getName() |
int |
getNumber() |
boolean |
onMouseAction(IGameInstance game,
int button,
float x,
float y) |
protected void |
onScroll() |
void |
render(IGameInstance game,
IAssetManager manager,
IRenderer g,
int x,
int y) |
void |
setMax(int max) |
void |
setNumber(int number) |
void |
update(IGameInstance game) |
canCloseWithInvKey, getElementColor, getElementOutlineColor, getGuiColor, getHeight, getPriority, getRenderX, getRenderY, getUnselectedElementColor, getWidth, getX, getY, isActive, isMouseOver, isMouseOverPrioritized, onCharInput, onKeyPressed, renderOverlay, setActive, shouldDoFingerCursor, toStringprotected final java.util.function.Consumer<java.lang.Integer> scrollConsumer
protected final BoundBox hoverArea
protected int number
protected int max
protected boolean wasMouseDown
public IResourceName getName()
getName in class GuiComponentpublic BoundBox getHoverArea()
public int getNumber()
public int getMax()
public void setNumber(int number)
public void setMax(int max)
public void render(IGameInstance game, IAssetManager manager, IRenderer g, int x, int y)
render in class GuiComponentpublic void update(IGameInstance game)
update in class GuiComponentpublic boolean onMouseAction(IGameInstance game, int button, float x, float y)
onMouseAction in class GuiComponentprotected void onScroll()