Class Checkbox
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractButton
net.minecraft.client.gui.components.Checkbox
- All Implemented Interfaces:
GuiEventListener
,Renderable
,TabOrderedElement
,LayoutElement
,NarratableEntry
,NarrationSupplier
,IAbstractWidgetExtension
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
private static final ResourceLocation
private static final ResourceLocation
private static final ResourceLocation
private static final ResourceLocation
private final Checkbox.OnValueChange
private boolean
private static final int
private static final int
private final MultiLineTextWidget
Fields inherited from class net.minecraft.client.gui.components.AbstractButton
SPRITES, TEXT_MARGIN
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorDescriptionCheckbox
(int p_93826_, int p_93827_, int p_352958_, Component p_93830_, Font p_309061_, boolean p_93831_, Checkbox.OnValueChange p_309172_) -
Method Summary
Modifier and TypeMethodDescriptionstatic Checkbox.Builder
private int
getAdjustedHeight
(Font p_352942_) private int
getAdjustedWidth
(int p_352963_, Component p_352934_, Font p_352953_) static int
getBoxSize
(Font p_309147_) (package private) static int
getDefaultWidth
(Component p_352957_, Font p_352937_) void
onPress()
void
renderWidget
(GuiGraphics p_283124_, int p_282925_, int p_282705_, float p_282612_) boolean
selected()
void
updateWidgetNarration
(NarrationElementOutput p_260253_) Methods inherited from class net.minecraft.client.gui.components.AbstractButton
keyPressed, onClick, renderString
Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, clicked, createNarrationMessage, defaultButtonNarrationText, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isFocused, isHovered, isHoveredOrFocused, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrationPriority, nextFocusPath, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderScrollingString, setAlpha, setFGColor, setFocused, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, visitWidgets, wrapDefaultNarrationMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
charTyped, getCurrentFocusPath, keyReleased, mouseMoved, mouseScrolled
Methods inherited from interface net.neoforged.neoforge.client.extensions.IAbstractWidgetExtension
onClick
Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPosition
-
Field Details
-
CHECKBOX_SELECTED_HIGHLIGHTED_SPRITE
-
CHECKBOX_SELECTED_SPRITE
-
CHECKBOX_HIGHLIGHTED_SPRITE
-
CHECKBOX_SPRITE
-
TEXT_COLOR
private static final int TEXT_COLOR- See Also:
-
SPACING
private static final int SPACING- See Also:
-
BOX_PADDING
private static final int BOX_PADDING- See Also:
-
selected
private boolean selected -
onValueChange
-
textWidget
-
-
Constructor Details
-
Checkbox
Checkbox(int p_93826_, int p_93827_, int p_352958_, Component p_93830_, Font p_309061_, boolean p_93831_, Checkbox.OnValueChange p_309172_)
-
-
Method Details
-
getAdjustedWidth
-
getAdjustedHeight
-
getDefaultWidth
-
builder
-
getBoxSize
-
onPress
public void onPress()- Specified by:
onPress
in classAbstractButton
-
selected
public boolean selected() -
updateWidgetNarration
- Specified by:
updateWidgetNarration
in classAbstractWidget
-
renderWidget
- Overrides:
renderWidget
in classAbstractButton
-