UIEditW

From Mod Wiki
Revision as of 12:06, 21 November 2007 by JRAD (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Class Tree

Overview

The wide edit window type has the same functionality as the regular edit window, but it supports wide strings for non ASCII input. It is mainly used when typing messages to friends or in the chat window.

Templates are used to decrease the amount of text needed to create an edit box, the _editw/_editw_scroll and _end_edit/_end_editw_scroll 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 editw;

Example:

_editw_scroll( MessageMemberMessage, 0, 0, 100, 60 )
	properties {
		vec2 textAlignment = TA_LEFT, TA_VCENTER;
		float	maxTextLength = 512;
	}
_end_editw_scroll


Properties

UIEditW Properties

Flags

UIEditW 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.