C4 Engine
C4 Engine API Documentation

class RadioWidget

Defined in:  C4Widgets.h
The RadioWidget class represents an interface widget that displays a radio button.

class RadioWidget final : public TextWidget


RadioWidget(const Vector2D& size, const char *text = nullptrconst char *font = nullptrfloat em = kDefaultFontSize);

size The size of the radio button widget, in pixels.
text The text to display with the radio button.
font The name of the font in which the text is displayed.
em The em size of the font, in pixels.
The RadioWidget class displays a radio button that can be in the selected or unselected state. When a radio button is selected, all other radio buttons in the same group (or in the entire window if the radio button is not in a group) are automatically unselected.

The default widget color controls the color of the text through the TextWidget base class. The kWidgetColorButton and kWidgetColorHilite color types are also supported by the radio widget, and they control the color of the radio button. The highlight color is applied to the button instead of the button color if the widget is in the selected state and the kRadioUseHighlightColor flag has been set. If a highlight color has not been explicitly specified, then the Interface Manager's global button color is used.
Base Classes
TextWidget The text displayed with the radio button is based on the TextWidget class.
See Also


Wiki Articles

Radio Widget