public class UICheckBox extends UIComponent<UICheckBox> implements IGuiText<UICheckBox>
| Modifier and Type | Class and Description |
|---|---|
static class |
UICheckBox.CheckEvent
Event fired when a
UICheckBox is checked or unchecked. |
ITransformable.Alpha, ITransformable.Brightness, ITransformable.Color, ITransformable.Position<T>, ITransformable.Rotate, ITransformable.Scale, ITransformable.Size<T>, ITransformable.Translate| Modifier and Type | Field and Description |
|---|---|
protected GuiIcon |
bgIcon |
protected GuiIcon |
bgIconDisabled |
protected GuiIcon |
cbChecked |
protected GuiIcon |
cbDisabled |
protected GuiIcon |
cbHovered |
protected MalisisFont |
font
The
MalisisFont to use for this UICheckBox. |
protected FontRenderOptions |
fro
The
FontRenderOptions to use for this UICheckBox. |
| Constructor and Description |
|---|
UICheckBox(MalisisGui gui) |
UICheckBox(MalisisGui gui,
java.lang.String text) |
| Modifier and Type | Method and Description |
|---|---|
void |
drawBackground(GuiRenderer renderer,
int mouseX,
int mouseY,
float partialTick)
Called first when drawing this
UIComponent. |
void |
drawForeground(GuiRenderer renderer,
int mouseX,
int mouseY,
float partialTick)
Called last when drawing this
UIComponent. |
MalisisFont |
getFont()
Gets the
MalisisFont used for this UILabel. |
FontRenderOptions |
getFontRendererOptions()
Gets the
FontRenderOptions used for this UILabel. |
java.lang.String |
getPropertyString()
Gets the property string.
|
java.lang.String |
getText()
Gets the text for this
UICheckBox. |
boolean |
isChecked()
Checks if this
UICheckBox is checked. |
boolean |
onClick(int x,
int y)
On click.
|
boolean |
onKeyTyped(char keyChar,
int keyCode)
Called when a key is typed inside
MalisisGui. |
UICheckBox |
setChecked(boolean checked)
Sets the state for this
UICheckBox. |
UICheckBox |
setFont(MalisisFont font,
FontRenderOptions fro)
|
UICheckBox |
setText(java.lang.String text)
Sets the text for this
UICheckBox. |
addControlComponent, componentX, componentY, draw, fireEvent, getAlpha, getAnchor, getComponentAt, getGui, getHeight, getName, getParent, getRawHeight, getRawWidth, getRenderer, getTooltip, getWidth, getX, getY, getZIndex, isDisabled, isFocused, isHovered, isInsideBounds, isRelativeHeight, isRelativeWidth, isVisible, onAddedToScreen, onButtonPress, onButtonRelease, onDoubleClick, onDrag, onMouseMove, onRightClick, onScrollWheel, parentX, parentY, register, relativeX, relativeY, removeAllControlComponents, removeControlComponent, screenX, screenY, setAlpha, setAnchor, setDisabled, setFocused, setHovered, setName, setParent, setPosition, setPosition, setSize, setTooltip, setTooltip, setVisible, setZIndex, toString, unregisterprotected GuiIcon bgIcon
protected GuiIcon bgIconDisabled
protected GuiIcon cbDisabled
protected GuiIcon cbChecked
protected GuiIcon cbHovered
protected MalisisFont font
protected FontRenderOptions fro
FontRenderOptions to use for this UICheckBox. If null, uses GuiRenderer.getDefaultFontRendererOptions().public UICheckBox(MalisisGui gui, java.lang.String text)
public UICheckBox(MalisisGui gui)
public MalisisFont getFont()
MalisisFont used for this UILabel.getFont in interface IGuiText<UICheckBox>public FontRenderOptions getFontRendererOptions()
FontRenderOptions used for this UILabel.getFontRendererOptions in interface IGuiText<UICheckBox>public UICheckBox setFont(MalisisFont font, FontRenderOptions fro)
setFont in interface IGuiText<UICheckBox>font - the new fontfro - the fropublic UICheckBox setText(java.lang.String text)
UICheckBox.text - the new textpublic java.lang.String getText()
UICheckBox.public boolean isChecked()
UICheckBox is checked.UICheckBox is checked or not.public UICheckBox setChecked(boolean checked)
UICheckBox. Does not fire UICheckBox.CheckEvent.checked - true if checkedUIComponentpublic boolean onClick(int x,
int y)
UIComponentonClick in class UIComponent<UICheckBox>x - the xy - the ypublic boolean onKeyTyped(char keyChar,
int keyCode)
IKeyListenerMalisisGui.onKeyTyped in interface IKeyListeneronKeyTyped in class UIComponent<UICheckBox>keyChar - the key charkeyCode - the key codepublic void drawBackground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponentUIComponent.drawBackground in class UIComponent<UICheckBox>renderer - the renderermouseX - the mouse xmouseY - the mouse ypartialTick - the partial tickpublic void drawForeground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponentUIComponent.drawForeground in class UIComponent<UICheckBox>renderer - the renderermouseX - the mouse xmouseY - the mouse ypartialTick - the partial tickpublic java.lang.String getPropertyString()
UIComponentgetPropertyString in class UIComponent<UICheckBox>