public class UIRadioButton extends UIComponent<UIRadioButton> implements IGuiText<UIRadioButton>
| Modifier and Type | Class and Description |
|---|---|
static class |
UIRadioButton.SelectEvent
Event fired when a
UIRadioButton changes its selection. |
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 MalisisFont |
font
The
MalisisFont to use for this UIRadioButton. |
protected FontRenderOptions |
fro
The
FontRenderOptions to use for this UIRadioButton. |
protected GuiIcon |
rbChecked |
protected GuiIcon |
rbDisabled |
protected GuiIcon |
rbHovered |
| Constructor and Description |
|---|
UIRadioButton(MalisisGui gui,
java.lang.String name) |
UIRadioButton(MalisisGui gui,
java.lang.String name,
java.lang.String text) |
| Modifier and Type | Method and Description |
|---|---|
static void |
addRadioButton(UIRadioButton rb) |
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. |
static UIRadioButton |
getSelected(java.lang.String name) |
static UIRadioButton |
getSelected(UIRadioButton rb) |
java.lang.String |
getText()
Gets the text for this
UICheckBox. |
boolean |
isSelected()
Checks if this
UIRadioButton is selected. |
boolean |
onClick(int x,
int y)
On click.
|
UIRadioButton |
setFont(MalisisFont font,
FontRenderOptions fro)
|
UIRadioButton |
setSelected()
Sets state of this
UIRadioButton to selected. |
UIRadioButton |
setText(java.lang.String text)
Sets the text for this
UIRadioButton. |
addControlComponent, componentX, componentY, draw, fireEvent, getAlpha, getAnchor, getComponentAt, getGui, getHeight, getName, getParent, getPropertyString, getRawHeight, getRawWidth, getRenderer, getTooltip, getWidth, getX, getY, getZIndex, isDisabled, isFocused, isHovered, isInsideBounds, isRelativeHeight, isRelativeWidth, isVisible, onAddedToScreen, onButtonPress, onButtonRelease, onDoubleClick, onDrag, onKeyTyped, 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 rbDisabled
protected GuiIcon rbChecked
protected GuiIcon rbHovered
protected MalisisFont font
protected FontRenderOptions fro
FontRenderOptions to use for this UIRadioButton. If null, uses
GuiRenderer.getDefaultFontRendererOptions().public UIRadioButton(MalisisGui gui, java.lang.String name, java.lang.String text)
public UIRadioButton(MalisisGui gui, java.lang.String name)
public MalisisFont getFont()
MalisisFont used for this UILabel.getFont in interface IGuiText<UIRadioButton>public FontRenderOptions getFontRendererOptions()
FontRenderOptions used for this UILabel.getFontRendererOptions in interface IGuiText<UIRadioButton>public UIRadioButton setFont(MalisisFont font, FontRenderOptions fro)
setFont in interface IGuiText<UIRadioButton>font - the new fontfro - the fropublic UIRadioButton setText(java.lang.String text)
UIRadioButton.text - the new textpublic java.lang.String getText()
UICheckBox.public boolean isSelected()
UIRadioButton is selected.public UIRadioButton setSelected()
UIRadioButton to selected.UIRadioButton.SelectEvent.public void drawBackground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponentUIComponent.drawBackground in class UIComponent<UIRadioButton>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<UIRadioButton>renderer - the renderermouseX - the mouse xmouseY - the mouse ypartialTick - the partial tickpublic boolean onClick(int x,
int y)
UIComponentonClick in class UIComponent<UIRadioButton>x - the xy - the ypublic static void addRadioButton(UIRadioButton rb)
public static UIRadioButton getSelected(java.lang.String name)
public static UIRadioButton getSelected(UIRadioButton rb)