public abstract class GuiComponentCheckBox extends BaseComponent
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
label |
protected boolean |
selected |
protected int |
u |
protected int |
v |
fontRenderer, keyboardEventListener, mouseEventListener, parent, toolTip, xPos, yPos
Constructor and Description |
---|
GuiComponentCheckBox(GuiBase<?> parent,
int x,
int y,
int u,
int v,
boolean initialValue,
java.lang.String text)
Main constructor for check boxes
IMPORTANT: You must put the selected texture directly to the right of this one in the texture for it to work
|
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Used to find how tall this is
|
java.lang.String |
getLabel() |
int |
getU()
Accessors/Mutators *
|
int |
getV() |
int |
getWidth()
Used to find how wide this is
|
void |
mouseDown(double x,
double y,
int button)
Called when the mouse is pressed
|
void |
render(int guiLeft,
int guiTop,
int mouseX,
int mouseY)
Called to render the component
|
void |
renderOverlay(int guiLeft,
int guiTop,
int mouseX,
int mouseY)
Called after base render, is already translated to guiLeft and guiTop, just move offset
|
void |
setLabel(java.lang.String label) |
void |
setU(int u) |
void |
setV(int v) |
protected abstract void |
setValue(boolean value)
Called when there is a change in state, use this to set the value on what this controls
|
getArea, getDynamicToolTip, getKeyboardEventListener, getMouseEventListener, getParent, getToolTip, getXPos, getYPos, isMouseOver, keyTyped, mouseDrag, mouseScrolled, mouseUp, renderToolTip, setKeyboardEventListener, setMouseEventListener, setParent, setToolTip, setXPos, setYPos
addButton, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, onClose, removed, render, renderBackground, renderBackground, renderComponentHoverEffect, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, setSize, shouldCloseOnEsc, tick, wrapScreenError
getFocused, isDragging, setDragging, setFocused
blit, blit, blit, blit, blit, drawCenteredString, drawRightAlignedString, drawString, fill, fillGradient, hLine, innerBlit, vLine
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected int u
protected int v
protected boolean selected
protected java.lang.String label
public GuiComponentCheckBox(GuiBase<?> parent, int x, int y, int u, int v, boolean initialValue, java.lang.String text)
parent
- The parentx
- The x posy
- The y posu
- The texture u posv
- The texture v postext
- The text to display to the rightprotected abstract void setValue(boolean value)
value
- The current value of this componentpublic void mouseDown(double x, double y, int button)
mouseDown
in class BaseComponent
x
- Mouse X Positiony
- Mouse Y Positionbutton
- Mouse Buttonpublic void render(int guiLeft, int guiTop, int mouseX, int mouseY)
render
in class BaseComponent
public void renderOverlay(int guiLeft, int guiTop, int mouseX, int mouseY)
renderOverlay
in class BaseComponent
public int getWidth()
getWidth
in class BaseComponent
public int getHeight()
getHeight
in class BaseComponent
public int getU()
public void setU(int u)
public int getV()
public void setV(int v)
public java.lang.String getLabel()
public void setLabel(java.lang.String label)