C4 Engine
C4 Engine API Documentation

class CheckWidget

Defined in:  C4Widgets.h
The CheckWidget class represents an interface widget that displays a check box.
Definition

class CheckWidget final : public TextWidget

Constructor

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

Parameters
size The size of the check box widget, in pixels.
text The text to display with the check box.
font The name of the font in which the text is displayed.
em The em size of the font, in pixels.
Description
The CheckWidget class displays a check box that can be in the checked state or unchecked state.

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 check widget, and they control the color of the check box. The highlight color is applied to the box instead of the button color if the widget is in the checked state and the kCheckUseHighlightColor 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 check box is based on the TextWidget class.
See Also

RadioWidget

Wiki Articles

Check Widget