UIRadioButton Class
Definition
Namespace: Brine2D.UI
Radio button UI component for exclusive selections within a group.
Inheritance System.Object → UIRadioButton
Implements IUIComponent, IAnchoredUIComponent
| Properties | |
|---|---|
| Anchor | The screen anchor point this component is positioned relative to. |
| AnchorOffset | Pixel offset from the resolved anchor point. |
| BorderColor | Border color. |
| ButtonSize | Radio button size in pixels \(for the actual radio circle\). |
| CheckedColor | Checked button color. |
| DotColor | Inner dot color when checked. |
| FocusColor | Color of the focus ring when the radio button has keyboard focus. |
| Font | Optional font for label rendering \(null = renderer default\). |
| Group | The group this radio button belongs to. |
| HoverColor | Hover button color. |
| IsChecked | Whether this radio button is selected. |
| IsFocused | Whether this radio button currently has keyboard focus. |
| Label | Radio button label text. Changing this updates Brine2D.UI.UIRadioButton.Size automatically. |
| LabelColor | Label text color. |
| LabelSpacing | Spacing between button and label. |
| UncheckedColor | Unchecked button color. |
| Methods | |
|---|---|
| Select() | Selects this radio button \(deselects others in the group\). IsChecked is set before OnSelectionChanged fires. |
| SetFocused\(bool\) | Called by UICanvas to set keyboard focus on this radio button. |
| SetHovered\(bool\) | Called by UICanvas when mouse hovers over radio button. |
| Events | |
|---|---|
| OnFocusGained | Event fired when this radio button gains keyboard focus. |
| OnFocusLost | Event fired when this radio button loses keyboard focus. |
| OnHoverEnter | Event fired when the mouse cursor enters the radio button bounds. |
| OnHoverExit | Event fired when the mouse cursor leaves the radio button bounds. |
| OnSelected | Event fired when this radio button is selected. |