Class HorizontalScrollbar
java.lang.Object
com.pixelmonmod.api.client.screen.widget.StatefulWidget<HorizontalScrollbar>
com.pixelmonmod.api.client.screen.widget.input.HorizontalScrollbar
- All Implemented Interfaces:
States<HorizontalScrollbar>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
HorizontalScrollbar
(float sliderWidth, float scrollDecay, float scrollMax) -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyScroll
(HorizontalScrollbar scrollbar) static HorizontalScrollbar
create
(double x, double y, double width, double height, float sliderWidth, float scrollDecay, float scrollMax) listener
(TriConsumer<StatefulScreen, Float, Float> listener) onMouseClicked
(Action action, double mouseX, double mouseY, int button) onMouseDragged
(Action action, double mouseX, double mouseY, int button, double deltaX, double deltaY) float
float
void
float
scroll()
float
void
setDecay
(float scrollDecay) void
setMax
(float scrollMax) void
setPercentage
(double percentage) void
slide
(float mouseX) speed
(float speed, float sizeFactor, float scalingFactor) void
update()
Methods inherited from class com.pixelmonmod.api.client.screen.widget.StatefulWidget
bounds, boundsOffset, boundsOffset, boundsOffset, child, children, colorTable, contains, contains, defaultTypeface, draggableInternal, draggedInternal, enabledInternal, equals, focusableInternal, focusedInternal, hashCode, hoverableInternal, hoveredInternal, index, index, init, init, initInternal, minecraft, offset, offset, offset, onCharTyped, onCharTypedInternal, onKeyPressed, onKeyPressedInternal, onKeyReleased, onKeyReleasedInternal, onMouseClickedInternal, onMouseClickedInternal, onMouseDraggedInternal, onMouseMoved, onMouseMovedInternal, onMousePressedInternal, onMouseReleased, onMouseReleasedInternal, onMouseScrolled, onMouseScrolledInternal, owner, owner, parent, parent, play, play, play, play, play, play, playClick, player, position, position, position, position, positionRemap, positionRemap, postMouseClicked, postRender, postRender, postTick, preMouseClicked, preRender, preRender, preTick, rawPosition, rawSize, renderInternal, self, size, size, size, size, sizeRemap, sizeRemap, stateInternal, tick, tickableInternal, tickInternal, toString, transform, transform, uid, updateBounds, visibleInternal, widget
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.pixelmonmod.api.client.screen.widget.States
active, disable, disabled, doesNotTick, draggable, draggable, dragged, dragged, enable, enabled, enabled, focusable, focusable, focused, focused, hidden, hide, hoverable, hoverable, hovered, hovered, inactive, noTicks, receivesTicks, show, state, state, state, tickable, ticks, visible, visible
-
Constructor Details
-
HorizontalScrollbar
protected HorizontalScrollbar(float sliderWidth, float scrollDecay, float scrollMax)
-
-
Method Details
-
create
public static HorizontalScrollbar create(double x, double y, double width, double height, float sliderWidth, float scrollDecay, float scrollMax) -
colors
-
speed
-
listener
-
render
- Overrides:
render
in classStatefulWidget<HorizontalScrollbar>
-
onMouseClicked
- Overrides:
onMouseClicked
in classStatefulWidget<HorizontalScrollbar>
-
onMouseDragged
public Action onMouseDragged(Action action, double mouseX, double mouseY, int button, double deltaX, double deltaY) - Overrides:
onMouseDragged
in classStatefulWidget<HorizontalScrollbar>
-
slide
public void slide(float mouseX) -
setPercentage
public void setPercentage(double percentage) -
update
public void update() -
setMax
public void setMax(float scrollMax) -
setDecay
public void setDecay(float scrollDecay) -
copyScroll
-
scroll
public float scroll() -
scrollRemaining
public float scrollRemaining() -
percentage
public float percentage() -
percentageRemaining
public float percentageRemaining()
-