Class Scrollbar
java.lang.Object
com.pixelmonmod.api.client.screen.widget.StatefulWidget<Scrollbar>
com.pixelmonmod.api.client.screen.widget.input.Scrollbar
-
Constructor Summary
ModifierConstructorDescriptionprotected
Scrollbar
(float sliderHeight, float scrollDecay, float scrollMax) -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyScroll
(Scrollbar scrollbar) static Scrollbar
create
(double x, double y, double width, double height, float sliderHeight, float scrollDecay, float scrollMax) listener
(TriConsumer<StatefulScreen, Float, Float> listener) onKeyPressed
(Action action, int keyCode, int scanCode, int modifiers) onMouseClicked
(Action action, double mouseX, double mouseY, int button) onMouseDragged
(Action action, double mouseX, double mouseY, int button, double deltaX, double deltaY) onMouseScrolled
(Action action, double mouseX, double mouseY, double deltaX, double deltaY) void
render
(WidgetRenderState<Scrollbar> state) float
scroll()
float
void
setDecay
(float scrollDecay) void
setMax
(float scrollMax) void
setPercentage
(double percentage) speed
(float speed, float sizeFactor, float scalingFactor) 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, onKeyPressedInternal, onKeyReleased, onKeyReleasedInternal, onMouseClickedInternal, onMouseDraggedInternal, onMouseMoved, onMouseMovedInternal, onMousePressedInternal, onMouseReleased, onMouseReleasedInternal, onMouseScrolledInternal, owner, owner, parent, parent, play, play, play, play, play, play, playClick, player, position, position, position, position, positionRemap, positionRemap, postRender, postRender, postTick, preRender, preRender, preTick, rawPosition, rawSize, renderInternal, self, size, size, size, size, sizeRemap, sizeRemap, stateInternal, tick, tickableInternal, tickInternal, toString, transform, transform, uid, 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
-
Scrollbar
protected Scrollbar(float sliderHeight, float scrollDecay, float scrollMax)
-
-
Method Details
-
create
public static Scrollbar create(double x, double y, double width, double height, float sliderHeight, float scrollDecay, float scrollMax) -
colors
-
speed
-
listener
-
render
- Overrides:
render
in classStatefulWidget<Scrollbar>
-
onMouseClicked
- Overrides:
onMouseClicked
in classStatefulWidget<Scrollbar>
-
onMouseDragged
public Action onMouseDragged(Action action, double mouseX, double mouseY, int button, double deltaX, double deltaY) - Overrides:
onMouseDragged
in classStatefulWidget<Scrollbar>
-
onMouseScrolled
public Action onMouseScrolled(Action action, double mouseX, double mouseY, double deltaX, double deltaY) - Overrides:
onMouseScrolled
in classStatefulWidget<Scrollbar>
-
onKeyPressed
- Overrides:
onKeyPressed
in classStatefulWidget<Scrollbar>
-
setPercentage
public void setPercentage(double percentage) -
setMax
public void setMax(float scrollMax) -
setDecay
public void setDecay(float scrollDecay) -
copyScroll
-
scroll
public float scroll() -
scrollRemaining
public float scrollRemaining()
-