Package net.minecraft.client.gui.widget
Class ToggleWidget
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.widget.Widget
-
- net.minecraft.client.gui.widget.ToggleWidget
-
- All Implemented Interfaces:
IGuiEventListener
,IRenderable
- Direct Known Subclasses:
RecipeTabToggleWidget
public class ToggleWidget extends Widget
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
isStateTriggered
protected ResourceLocation
resourceLocation
protected int
xDiffTex
protected int
xTexStart
protected int
yDiffTex
protected int
yTexStart
-
Fields inherited from class net.minecraft.client.gui.widget.Widget
active, alpha, height, isHovered, nextNarration, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, y
-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Constructor Description ToggleWidget(int p_i51128_1_, int p_i51128_2_, int p_i51128_3_, int p_i51128_4_, boolean p_i51128_5_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initTextureValues(int p_191751_1_, int p_191751_2_, int p_191751_3_, int p_191751_4_, ResourceLocation p_191751_5_)
boolean
isStateTriggered()
void
renderButton(MatrixStack p_230431_1_, int p_230431_2_, int p_230431_3_, float p_230431_4_)
void
setPosition(int p_191752_1_, int p_191752_2_)
void
setStateTriggered(boolean p_191753_1_)
-
Methods inherited from class net.minecraft.client.gui.widget.Widget
changeFocus, clearFGColor, clicked, createNarrationMessage, getFGColor, getHeight, getMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onClick, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, renderToolTip, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidth
-
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
-
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.IGuiEventListener
charTyped, keyPressed, keyReleased, mouseMoved, mouseScrolled
-
-
-
-
Field Detail
-
resourceLocation
protected ResourceLocation resourceLocation
-
isStateTriggered
protected boolean isStateTriggered
-
xTexStart
protected int xTexStart
-
yTexStart
protected int yTexStart
-
xDiffTex
protected int xDiffTex
-
yDiffTex
protected int yDiffTex
-
-
Method Detail
-
initTextureValues
public void initTextureValues(int p_191751_1_, int p_191751_2_, int p_191751_3_, int p_191751_4_, ResourceLocation p_191751_5_)
-
setStateTriggered
public void setStateTriggered(boolean p_191753_1_)
-
isStateTriggered
public boolean isStateTriggered()
-
setPosition
public void setPosition(int p_191752_1_, int p_191752_2_)
-
renderButton
public void renderButton(MatrixStack p_230431_1_, int p_230431_2_, int p_230431_3_, float p_230431_4_)
- Overrides:
renderButton
in classWidget
-
-