Package net.minecraft.client.gui.widget
Class CheckboxWidget
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widget.AbstractButtonWidget
net.minecraft.client.gui.widget.AbstractPressableButtonWidget
net.minecraft.client.gui.widget.CheckboxWidget
@Environment(CLIENT) public class CheckboxWidget extends AbstractPressableButtonWidget
-
Field Summary
Fields Modifier and Type Field Description private booleancheckedprivate booleanshowMessageprivate static IdentifierTEXTUREFields inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
active, alpha, height, hovered, nextNarration, visible, WIDGETS_LOCATION, width, x, yFields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE -
Constructor Summary
Constructors Constructor Description CheckboxWidget(int x, int y, int width, int height, Text message, boolean checked)CheckboxWidget(int x, int y, int width, int height, Text message, boolean checked, boolean showMessage) -
Method Summary
Modifier and Type Method Description booleanisChecked()voidonPress()voidrenderButton(MatrixStack matrices, int mouseX, int mouseY, float delta)Methods inherited from class net.minecraft.client.gui.widget.AbstractPressableButtonWidget
keyPressed, onClickMethods inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, renderToolTip, setAlpha, setFocused, setMessage, setWidthMethods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffsetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.Element
charTyped, keyReleased, mouseMoved, mouseScrolled
-
Field Details
-
TEXTURE
-
checked
private boolean checked -
showMessage
private final boolean showMessage
-
-
Constructor Details
-
CheckboxWidget
-
CheckboxWidget
public CheckboxWidget(int x, int y, int width, int height, Text message, boolean checked, boolean showMessage)
-
-
Method Details
-
onPress
public void onPress()- Specified by:
onPressin classAbstractPressableButtonWidget
-
isChecked
public boolean isChecked() -
renderButton
- Overrides:
renderButtonin classAbstractButtonWidget
-