Table of Contents

Class RadioButton

Namespace
MLEM.Ui.Elements
Assembly
MLEM.Ui.dll

A radio button element to use inside of a UiSystem. A radio button is a variation of a Checkbox that causes all other radio buttons in the same RootElement to be deselected upon selection.

public class RadioButton : Checkbox, IGenericDataHolder
Inheritance
RadioButton
Implements
Inherited Members
Extension Methods

Constructors

RadioButton(Anchor, Vector2, string, bool, string)

Creates a new radio button with the given settings

public RadioButton(Anchor anchor, Vector2 size, string label, bool defaultChecked = false, string group = "")

Parameters

anchor Anchor

The radio button's anchor

size Vector2

The radio button's size

label string

The label to display next to the radio button

defaultChecked bool

If the radio button should be checked by default

group string

The group that the radio button has

Fields

Group

The group that this radio button has. All other radio buttons in the same RootElement that have the same group will be deselected when this radio button is selected.

public string Group

Field Value

string

Methods

InitStyle(UiStyle)

Initializes this element's StyleProp<T> instances using the ui system's UiStyle.

protected override void InitStyle(UiStyle style)

Parameters

style UiStyle

The new style