public class WSlider extends WAbstractSlider
for supported listenersWAbstractSlider.Direction| Modifier and Type | Field and Description |
|---|---|
static net.minecraft.util.Identifier |
DARK_TEXTURE |
static net.minecraft.util.Identifier |
LIGHT_TEXTURE |
static int |
THUMB_SIZE |
static int |
TRACK_WIDTH |
axis, coordToValueRatio, direction, dragging, max, min, value, valueToCoordRatio| Modifier and Type | Method and Description |
|---|---|
@Nullable BackgroundPainter |
getBackgroundPainter() |
protected int |
getThumbWidth() |
protected boolean |
isMouseInsideBounds(int x,
int y)
Checks if the mouse cursor is close enough to the slider that the user can start dragging.
|
void |
paint(net.minecraft.client.util.math.MatrixStack matrices,
int x,
int y,
int mouseX,
int mouseY)
Paints this widget.
|
void |
setBackgroundPainter(@Nullable BackgroundPainter backgroundPainter) |
canFocus, canResize, getAxis, getDirection, getDraggingFinishedListener, getMaxValue, getMinValue, getValue, getValueChangeListener, isDecreasingKey, isDragging, isIncreasingKey, onClick, onKeyPressed, onKeyReleased, onMouseDown, onMouseDrag, onMouseScroll, onMouseUp, onValueChanged, setDirection, setDraggingFinishedListener, setMaxValue, setMinValue, setSize, setValue, setValue, setValueChangeListener, tickaddPainters, addTooltip, createPeers, cycleFocus, getAbsoluteX, getAbsoluteY, getHeight, getHost, getParent, getWidth, getX, getY, hit, isActivationKey, isFocused, isWithinBounds, onCharTyped, onFocusGained, onFocusLost, onHidden, onMouseMove, onShown, releaseFocus, renderTooltip, requestFocus, setHost, setLocation, setParent, validatepublic static final int TRACK_WIDTH
public static final int THUMB_SIZE
public static final net.minecraft.util.Identifier LIGHT_TEXTURE
public static final net.minecraft.util.Identifier DARK_TEXTURE
public WSlider(int min,
int max,
Axis axis)
protected int getThumbWidth()
getThumbWidth in class WAbstractSliderprotected boolean isMouseInsideBounds(int x,
int y)
WAbstractSliderisMouseInsideBounds in class WAbstractSliderx - the mouse x positiony - the mouse y position@Environment(value=CLIENT)
public void paint(net.minecraft.client.util.math.MatrixStack matrices,
int x,
int y,
int mouseX,
int mouseY)
WWidget@Environment(value=CLIENT) @Nullable public @Nullable BackgroundPainter getBackgroundPainter()
@Environment(value=CLIENT)
public void setBackgroundPainter(@Nullable
@Nullable BackgroundPainter backgroundPainter)