UIEdit
From Mod Wiki
Class Tree
Overview
An edit window should be used to get text input from the player. It is used for entering a server password, player name, clan tag, renaming the fireteam and chat text among other things. If the edit window should support non ASCII characters then editw should be used instead.
Templates are used to decrease the amount of text needed to create an edit box, the _edit and _end_edit templates should be used.
This class may be used in the GUIs. It will inherit all properties, flags, functions and events from UIWindow.
Window type:
type edit;
Example:
_edit( createServerName, 100, 0, 100, BUTTON_HEIGHT ) _cvar_set_edit( si_name ) _draw_left_edit_label( localize( "guis/mainmenu/servername" ), COLOR_TEXT, 100 ) properties { float maxTextLength = 30; } _end_edit
Properties
Flags
Functions
General Functions
clearText Clear all window text. isWhitespace Check whitespaces, ignores all color codes. insertText Insert text into the edit box. surroundSelection Select certain substring. anySelected Check if any of the edit text is selected. selectAll Select all text in the edit box.
Events
onInputFailed Called if typing any characters that breaks the EF_ALLOW_DECIMAL/EF_INTEGERS_ONLY flags.