public class ComponentScrollBar extends GuiComponent
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
drawReversed |
protected BoundBox |
hoverArea |
protected int |
max |
protected int |
number |
protected java.util.function.Consumer<java.lang.Integer> |
scrollConsumer |
protected ResourceName |
scrollTexture |
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) |
ComponentScrollBar(Gui gui,
int x,
int y,
int width,
int height,
BoundBox hoverArea,
int max,
java.util.function.Consumer<java.lang.Integer> scrollConsumer,
ResourceName scrollTexture) |
| Modifier and Type | Method and Description |
|---|---|
BoundBox |
getHoverArea() |
int |
getMax() |
ResourceName |
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 |
setDrawReversed(boolean should) |
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, setPos, shouldDoFingerCursor, toString, updateInactiveprotected final java.util.function.Consumer<java.lang.Integer> scrollConsumer
protected final BoundBox hoverArea
protected final ResourceName scrollTexture
protected int number
protected int max
protected boolean wasMouseDown
protected boolean drawReversed
public ComponentScrollBar(Gui gui, int x, int y, int width, int height, BoundBox hoverArea, int max, java.util.function.Consumer<java.lang.Integer> scrollConsumer, ResourceName scrollTexture)
public ResourceName getName()
getName in class GuiComponentpublic BoundBox getHoverArea()
public int getNumber()
public void setNumber(int number)
public int getMax()
public void setMax(int max)
public void setDrawReversed(boolean should)
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()