@Environment(value=CLIENT) public class ToggleButtonWidget extends AbstractButtonWidget
Modifier and Type | Field and Description |
---|---|
protected int |
hoverVOffset |
protected int |
pressedUOffset |
protected Identifier |
texture |
protected boolean |
toggled |
protected int |
u |
protected int |
v |
active, alpha, height, hovered, nextNarration, visible, WIDGETS_LOCATION, width, x, y
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
Constructor and Description |
---|
ToggleButtonWidget(int x,
int y,
int width,
int height,
boolean toggled) |
Modifier and Type | Method and Description |
---|---|
boolean |
isToggled() |
void |
renderButton(MatrixStack matrices,
int mouseX,
int mouseY,
float delta) |
void |
setPos(int x,
int y) |
void |
setTextureUV(int u,
int v,
int pressedUOffset,
int hoverVOffset,
Identifier texture) |
void |
setToggled(boolean toggled) |
changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onClick, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, renderToolTip, setAlpha, setFocused, setMessage, setWidth
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
charTyped, keyPressed, keyReleased, mouseMoved, mouseScrolled
protected Identifier texture
protected boolean toggled
protected int u
protected int v
protected int pressedUOffset
protected int hoverVOffset
public ToggleButtonWidget(int x, int y, int width, int height, boolean toggled)
public void setTextureUV(int u, int v, int pressedUOffset, int hoverVOffset, Identifier texture)
public void setToggled(boolean toggled)
public boolean isToggled()
public void setPos(int x, int y)
public void renderButton(MatrixStack matrices, int mouseX, int mouseY, float delta)
renderButton
in class AbstractButtonWidget