public class WScrollPanel extends WClippedPanel
| Modifier and Type | Field and Description |
|---|---|
protected WScrollBar |
horizontalScrollBar
The horizontal scroll bar of this panel.
|
protected WScrollBar |
verticalScrollBar
The vertical scroll bar of this panel.
|
| Constructor and Description |
|---|
WScrollPanel(WWidget widget)
Creates a vertically scrolling panel.
|
| Modifier and Type | Method and Description |
|---|---|
net.fabricmc.fabric.api.util.TriState |
isScrollingHorizontally()
Returns whether this scroll panel has a horizontal scroll bar.
|
net.fabricmc.fabric.api.util.TriState |
isScrollingVertically()
Returns whether this scroll panel has a vertical scroll bar.
|
void |
layout()
Uses this Panel's layout rules to reposition and resize components to fit nicely in the panel.
|
InputResult |
onMouseScroll(int x,
int y,
double amount)
Notifies this widget that the mouse has been scrolled inside its bounds.
|
void |
paint(net.minecraft.client.util.math.MatrixStack matrices,
int x,
int y,
int mouseX,
int mouseY)
Paints this widget.
|
WScrollPanel |
setScrollingHorizontally(net.fabricmc.fabric.api.util.TriState scrollingHorizontally) |
WScrollPanel |
setScrollingVertically(net.fabricmc.fabric.api.util.TriState scrollingVertically) |
addPainters, canResize, createPeers, cycleFocus, cycleFocus, expandToFit, expandToFit, getBackgroundPainter, hit, onHidden, onShown, remove, setBackgroundPainter, tick, toString, validateaddTooltip, canFocus, getAbsoluteX, getAbsoluteY, getHeight, getHost, getParent, getWidth, getX, getY, isActivationKey, isFocused, isWithinBounds, onCharTyped, onClick, onFocusGained, onFocusLost, onKeyPressed, onKeyReleased, onMouseDown, onMouseDrag, onMouseMove, onMouseUp, releaseFocus, renderTooltip, requestFocus, setHost, setLocation, setParent, setSizeprotected WScrollBar horizontalScrollBar
protected WScrollBar verticalScrollBar
public WScrollPanel(WWidget widget)
widget - the viewed widgetpublic net.fabricmc.fabric.api.util.TriState isScrollingHorizontally()
public WScrollPanel setScrollingHorizontally(net.fabricmc.fabric.api.util.TriState scrollingHorizontally)
public net.fabricmc.fabric.api.util.TriState isScrollingVertically()
public WScrollPanel setScrollingVertically(net.fabricmc.fabric.api.util.TriState scrollingVertically)
@Environment(value=CLIENT)
public void paint(net.minecraft.client.util.math.MatrixStack matrices,
int x,
int y,
int mouseX,
int mouseY)
WWidgetpaint in class WClippedPanelmatrices - the rendering matrix stackx - this widget's X coordinate on the screeny - this widget's Y coordinate on the screenmouseX - the X coordinate of the cursormouseY - the X coordinate of the cursorpublic void layout()
WPanelpublic InputResult onMouseScroll(int x, int y, double amount)
WWidgetonMouseScroll in class WWidgetx - The X coordinate of the event, in widget-space (0 is the left edge of this widget)y - The Y coordinate of the event, in widget-space (0 is the top edge of this widget)amount - The scrolled amount. Positive values are up and negative values are down.InputResult.PROCESSED if the event is handled, InputResult.IGNORED otherwise.