Package net.minecraft.client.gui.widget
Class ToggleButtonWidget
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.widget.AbstractButtonWidget
net.minecraft.client.gui.widget.ToggleButtonWidget
- Direct Known Subclasses:
RecipeGroupButtonWidget
@Environment(CLIENT) public class ToggleButtonWidget extends AbstractButtonWidget
- Mappings:
Namespace Name official dsl
intermediary net/minecraft/class_361
named net/minecraft/client/gui/widget/ToggleButtonWidget
-
Field Summary
Fields Modifier and Type Field Description protected int
hoverVOffset
protected int
pressedUOffset
protected Identifier
texture
protected boolean
toggled
protected int
u
protected int
v
Fields inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
active, alpha, height, hovered, nextNarration, visible, WIDGETS_LOCATION, width, x, y
Fields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
-
Constructor Summary
Constructors Constructor Description ToggleButtonWidget(int x, int y, int width, int height, boolean toggled)
-
Method Summary
Modifier and Type Method 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)
Methods inherited from class net.minecraft.client.gui.widget.AbstractButtonWidget
changeFocus, clicked, getHeight, getMessage, getNarrationMessage, getNarrationMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onClick, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, renderToolTip, setAlpha, setFocused, setMessage, setWidth
Methods 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, method_33284, setZOffset
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.Element
charTyped, keyPressed, keyReleased, mouseMoved, mouseScrolled
-
Field Details
-
texture
- Mappings:
Namespace Name Mixin selector official a
Ldsl;a:Lwb;
intermediary field_2193
Lnet/minecraft/class_361;field_2193:Lnet/minecraft/class_2960;
named texture
Lnet/minecraft/client/gui/widget/ToggleButtonWidget;texture:Lnet/minecraft/util/Identifier;
-
toggled
protected boolean toggled- Mappings:
Namespace Name Mixin selector official b
Ldsl;b:Z
intermediary field_2194
Lnet/minecraft/class_361;field_2194:Z
named toggled
Lnet/minecraft/client/gui/widget/ToggleButtonWidget;toggled:Z
-
u
protected int u- Mappings:
Namespace Name Mixin selector official c
Ldsl;c:I
intermediary field_2192
Lnet/minecraft/class_361;field_2192:I
named u
Lnet/minecraft/client/gui/widget/ToggleButtonWidget;u:I
-
v
protected int v- Mappings:
Namespace Name Mixin selector official d
Ldsl;d:I
intermediary field_2191
Lnet/minecraft/class_361;field_2191:I
named v
Lnet/minecraft/client/gui/widget/ToggleButtonWidget;v:I
-
pressedUOffset
protected int pressedUOffset- Mappings:
Namespace Name Mixin selector official e
Ldsl;e:I
intermediary field_2190
Lnet/minecraft/class_361;field_2190:I
named pressedUOffset
Lnet/minecraft/client/gui/widget/ToggleButtonWidget;pressedUOffset:I
-
hoverVOffset
protected int hoverVOffset- Mappings:
Namespace Name Mixin selector official s
Ldsl;s:I
intermediary field_2189
Lnet/minecraft/class_361;field_2189:I
named hoverVOffset
Lnet/minecraft/client/gui/widget/ToggleButtonWidget;hoverVOffset:I
-
-
Constructor Details
-
ToggleButtonWidget
public ToggleButtonWidget(int x, int y, int width, int height, boolean toggled)- Mappings:
Namespace Name Mixin selector official <init>
Ldsl;<init>(IIIIZ)V
intermediary <init>
Lnet/minecraft/class_361;<init>(IIIIZ)V
named <init>
Lnet/minecraft/client/gui/widget/ToggleButtonWidget;<init>(IIIIZ)V
-
-
Method Details
-
setTextureUV
- Mappings:
Namespace Name Mixin selector official a
Ldsl;a(IIIILwb;)V
intermediary method_1962
Lnet/minecraft/class_361;method_1962(IIIILnet/minecraft/class_2960;)V
named setTextureUV
Lnet/minecraft/client/gui/widget/ToggleButtonWidget;setTextureUV(IIIILnet/minecraft/util/Identifier;)V
-
setToggled
public void setToggled(boolean toggled)- Mappings:
Namespace Name Mixin selector official e
Ldsl;e(Z)V
intermediary method_1964
Lnet/minecraft/class_361;method_1964(Z)V
named setToggled
Lnet/minecraft/client/gui/widget/ToggleButtonWidget;setToggled(Z)V
-
isToggled
public boolean isToggled()- Mappings:
Namespace Name Mixin selector official a
Ldsl;a()Z
intermediary method_1965
Lnet/minecraft/class_361;method_1965()Z
named isToggled
Lnet/minecraft/client/gui/widget/ToggleButtonWidget;isToggled()Z
-
setPos
public void setPos(int x, int y)- Mappings:
Namespace Name Mixin selector official a
Ldsl;a(II)V
intermediary method_1963
Lnet/minecraft/class_361;method_1963(II)V
named setPos
Lnet/minecraft/client/gui/widget/ToggleButtonWidget;setPos(II)V
-
renderButton
- Overrides:
renderButton
in classAbstractButtonWidget
- Mappings:
Namespace Name Mixin selector official b
Ldrs;b(Ldlr;IIF)V
intermediary method_25359
Lnet/minecraft/class_339;method_25359(Lnet/minecraft/class_4587;IIF)V
named renderButton
Lnet/minecraft/client/gui/widget/AbstractButtonWidget;renderButton(Lnet/minecraft/client/util/math/MatrixStack;IIF)V
-