C4 Engine
C4 Engine API Documentation

class TextButtonWidget

Defined in:  C4Widgets.h
The TextButtonWidget class represents an interface widget that displays an interactive text string.
Definition

class TextButtonWidget : public TextWidget

Constructor

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

Parameters
size The size of the text widget, in pixels.
text The text string that is displayed.
font The name of the font in which the text is displayed.
em The em size of the font, in pixels.
Description
The TextButtonWidget class displays a clickable text string.

The default widget color corresponds to the kWidgetColorText color type and determines the color of the text. The kWidgetColorHilite color type is also supported by the text button widget, and it controls the color of the text while the user is pressing the button.
Base Classes
TextWidget The TextButtonWidget class is a special type of text widget.
See Also

HyperlinkWidget

Wiki Articles

Text Button Widget