phoenix::RadioItem
Used to represent a group of mutually exclusive radio options in a menu.
struct RadioItem : Action {
function<void ()> onActivate;
static void group(const RadioItem&... items);
bool checked();
void setChecked();
void setText(const string &text);
};
function<void ()> RadioItem::onActivate;
Called when a radio item is set to the active item in a group. Does not get called if item is selected but is already active. Does not get called if a radio item loses its active state.
static void RadioItem::group(const RadioItem&... items);
Used to group multiple radio items together. Pass all of the radio items to this function that should be part of a single group. Only one item in the group can be checked at the same time. Calling this will set the first item in the group to checked state, and all others to unchecked state.
bool RadioItem::checked();
True if the radio item is currently the active item in the group.
void RadioItem::setChecked();
Sets this radio item to the active item in the group.
void RadioItem::setText(const string &text);
Sets the text label for this radio item.