UITextInput Class
Text input field UI component with cursor support.
public class UITextInput : Brine2D.UI.IUIComponent
Inheritance System.Object → UITextInput
Implements IUIComponent
| Properties | |
|---|---|
| BackgroundColor | Background color when unfocused. |
| BorderColor | Border color. |
| CursorPosition | Current cursor position (character index, 0 = before first character). |
| FocusedBackgroundColor | Background color when focused. |
| FocusedBorderColor | Focused border color. |
| IsFocused | Whether this input is currently focused. |
| MaxLength | Maximum character length (0 = unlimited). |
| Placeholder | Placeholder text shown when empty. |
| PlaceholderColor | Placeholder text color. |
| Text | Current text value. |
| TextColor | Text color. |
| Methods | |
|---|---|
| HandleTextInput(IInputContext) | Called by UICanvas to handle text input. |
| SetFocused(bool, IInputContext) | Called by UICanvas when input is focused. |
| Events | |
|---|---|
| OnSubmit | Event fired when Enter key is pressed. |
| OnTextChanged | Event fired when text changes. |