GUITextField

From Virtual World Web Wiki
Jump to: navigation, search

A component representing a non-scrolling text field.

Remarks [edit]

Properties

Color32 ActiveTextColor {get; set;}
What color should the text be when we're editting it?
string ActiveTextColorHex {get; set;}
What color should the text be when we're editting it? (Hex representation)
int CharacterLimit {get; set;}
Maximum length of text in the text field.
bool ClearOnEnter {get; set;}
Should the text field clear itself when the user presses "Enter"? Useful for chat boxes, etc.
int CursorPos {get; set;}
Current index of the input caret within the text field.
bool HasFocus {get; set;}
Gets or sets focus of this text field
Color32 HighlightColor {get; set;}
What color should the highlight box appear as?
string HighlightColorHex {get; set;}
What color should the highlight box appear as? (Hex representation)
ContentType InputType {get; set;}
What type of input box is it? What does it accept?
bool MultiLine {get; set;}
Does pressing Enter create more lines of text?
string Value {get; set;}
Contents of the text field

Events

OnEndEditing()
Event fired when the user tabs away, clicks away, or otherwise loses focus on the text field.
OnEnter()
Event fired when the user presses "Enter"
OnTextChanged()
Event fired when the user changes any part of the text field's text.