C4 Engine
C4 Engine API Documentation

class PushButtonWidget

Defined in:  C4Widgets.h
The PushButtonWidget class represents an interface widget that displays a push button containing text.
Definition

class PushButtonWidget final : public TextWidget

Constructor

PushButtonWidget(const Vector2D& size, const char *text = nullptrconst char *font = nullptrfloat em = 16.0F);

Parameters
size The size of the push button widget, in pixels.
text The text to display inside the push button.
font The name of the font in which the text is displayed.
em The em size of the font, in pixels.
Description
The PushButtonWidget class displays a button with a text string.

The default widget color controls the color of the text through the TextWidget base class. The kWidgetColorButton color type is also supported by the push button widget, and it controls the color of the button. If a button color has not been explicitly specified, then the Interface Manager's global button color is used.
Base Classes
TextWidget The text displayed in the push button is based on the TextWidget class.
See Also

TextButtonWidget

Wiki Articles

Push Button Widget