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.

class EditTextWidget : public TextWidget


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

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.
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, and kWidgetColorCaret. If a highlight color has not been explicitly specified, then the Interface Manager's global highlight color is used.
Base Classes
TextWidget The text displayed in the text box is based on the TextWidget class.
See Also


Wiki Articles

Edit Text Widget