public class UIRadioButton extends UIComponent<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 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 label) |
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 . |
static UIRadioButton |
getSelected(java.lang.String name) |
static UIRadioButton |
getSelected(UIRadioButton rb) |
boolean |
isSelected() |
boolean |
onClick(int x,
int y) |
void |
setSelected() |
addControlComponent, componentX, componentY, draw, fireEvent, getAlpha, getAnchor, getComponentAt, getGui, getHeight, getName, getParent, getPropertyString, getRawHeight, getRawWidth, 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, unregister
protected GuiIcon bgIcon
protected GuiIcon bgIconDisabled
protected GuiIcon rbDisabled
protected GuiIcon rbChecked
protected GuiIcon rbHovered
public UIRadioButton(MalisisGui gui, java.lang.String name, java.lang.String label)
public UIRadioButton(MalisisGui gui, java.lang.String name)
public boolean isSelected()
public void setSelected()
public void drawBackground(GuiRenderer renderer, int mouseX, int mouseY, float partialTick)
UIComponent
UIComponent
.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)
UIComponent
UIComponent
.drawForeground
in class UIComponent<UIRadioButton>
renderer
- the renderermouseX
- the mouse xmouseY
- the mouse ypartialTick
- the partial tickpublic boolean onClick(int x, int y)
onClick
in class UIComponent<UIRadioButton>
public static void addRadioButton(UIRadioButton rb)
public static UIRadioButton getSelected(java.lang.String name)
public static UIRadioButton getSelected(UIRadioButton rb)