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 MalisisFont |
font
The
MalisisFont to use for this UIRadioButton. |
protected FontRenderOptions |
fro
The
FontRenderOptions to use for this UIRadioButton. |
| 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. |
FontRenderOptions |
getFontRenderOptions()
Gets the
FontRenderOptions. |
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)
Sets the
MalisisFont. |
UIRadioButton |
setFontRenderOptions(FontRenderOptions fro)
Sets the
FontRenderOptions. |
UIRadioButton |
setSelected()
Sets state of this
UIRadioButton to selected. |
UIRadioButton |
setText(java.lang.String text)
Sets the text for this
UIRadioButton. |
addControlComponent, attachData, componentX, componentY, draw, fireEvent, getAlpha, getAnchor, getComponentAt, getData, getGui, getHeight, getIconProvider, 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, self, setAlpha, setAnchor, setDisabled, setFocused, setHovered, setName, setParent, setPosition, setPosition, setSize, setTooltip, setTooltip, setVisible, setZIndex, toString, unregisterprotected MalisisFont font
MalisisFont to use for this UIRadioButton.protected FontRenderOptions fro
FontRenderOptions to use for this UIRadioButton.public UIRadioButton(MalisisGui gui, java.lang.String name, java.lang.String text)
public UIRadioButton(MalisisGui gui, java.lang.String name)
public MalisisFont getFont()
IGuiTextMalisisFont.getFont in interface IGuiText<UIRadioButton>public UIRadioButton setFont(MalisisFont font)
IGuiTextMalisisFont.setFont in interface IGuiText<UIRadioButton>font - the new fontpublic FontRenderOptions getFontRenderOptions()
IGuiTextFontRenderOptions.getFontRenderOptions in interface IGuiText<UIRadioButton>public UIRadioButton setFontRenderOptions(FontRenderOptions fro)
IGuiTextFontRenderOptions.setFontRenderOptions in interface IGuiText<UIRadioButton>fro - 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)