C4 Engine
C4 Engine API Documentation

class EditTextWidget

Defined in:  C4Widgets.h
The EditTextWidget class represents an interface widget that displays an editable text box.
Definition

class EditTextWidget : public TextWidget

Constructor

EditTextWidget(const Vector2D& size, int32 charCount, const char *font = nullptrfloat em = kDefaultFontSize);

Parameters
size The size of the text box, in pixels.
charCount The maximum number of characters that can be entered into the text box.
font The name of the font in which the text is displayed.
em The em size of the font, in pixels.
Description
The EditTextWidget class displays an editable text box that allows a single line or multiple lines of text entry.

The default widget color corresponds to the kWidgetColorText color type and determines the color of the text. Other color types supported by the edit text widget are kWidgetColorBorder, kWidgetColorBackground, kWidgetColorHilite, kWidgetColorFocus, and kWidgetColorCaret. If a highlight color or focus color have not been explicitly specified, then the Interface Manager's global highlight color or focus color is used.
Base Classes
TextWidget The text displayed in the text box is based on the TextWidget class.
See Also

PasswordWidget

Wiki Articles

Edit Text Widget