Unity UI text field UI implementation. More...
Public Member Functions | |
void | StartTextInput (string labelText, string text, int maxLength, AcceptedTextDelegate acceptedText) |
Starts the text input field. More... | |
void | Update () |
void | CancelTextInput () |
Cancels the text input field. More... | |
void | AcceptTextInput () |
Accepts the text input and calls the accept handler delegate. More... | |
Public Attributes | |
UnityEngine.UI.Graphic | panel |
The (optional) panel. More... | |
UnityEngine.UI.Text | label |
The label that will contain any label text prompting the user what to enter. More... | |
UnityEngine.UI.InputField | textField |
The text field. More... | |
KeyCode | acceptKey = KeyCode.Return |
The accept key. More... | |
KeyCode | cancelKey = KeyCode.Escape |
The cancel key. More... | |
bool | showTouchScreenKeyboard = false |
UnityEvent | onAccept = new UnityEvent() |
UnityEvent | onCancel = new UnityEvent() |
Unity UI text field UI implementation.
void PixelCrushers.DialogueSystem.UnityUITextFieldUI.AcceptTextInput | ( | ) |
Accepts the text input and calls the accept handler delegate.
void PixelCrushers.DialogueSystem.UnityUITextFieldUI.CancelTextInput | ( | ) |
Cancels the text input field.
Implements PixelCrushers.DialogueSystem.ITextFieldUI.
void PixelCrushers.DialogueSystem.UnityUITextFieldUI.StartTextInput | ( | string | labelText, |
string | text, | ||
int | maxLength, | ||
AcceptedTextDelegate | acceptedText | ||
) |
Starts the text input field.
labelText | The label text. |
text | The current value to use for the input field. |
maxLength | Max length, or 0 for unlimited. |
acceptedText | The delegate to call when accepting text. |
Implements PixelCrushers.DialogueSystem.ITextFieldUI.
void PixelCrushers.DialogueSystem.UnityUITextFieldUI.Update | ( | ) |
KeyCode PixelCrushers.DialogueSystem.UnityUITextFieldUI.acceptKey = KeyCode.Return |
The accept key.
KeyCode PixelCrushers.DialogueSystem.UnityUITextFieldUI.cancelKey = KeyCode.Escape |
The cancel key.
UnityEngine.UI.Text PixelCrushers.DialogueSystem.UnityUITextFieldUI.label |
The label that will contain any label text prompting the user what to enter.
UnityEvent PixelCrushers.DialogueSystem.UnityUITextFieldUI.onAccept = new UnityEvent() |
UnityEvent PixelCrushers.DialogueSystem.UnityUITextFieldUI.onCancel = new UnityEvent() |
UnityEngine.UI.Graphic PixelCrushers.DialogueSystem.UnityUITextFieldUI.panel |
The (optional) panel.
If your text field UI contains more than a label and text field, you should assign the panel, too.
bool PixelCrushers.DialogueSystem.UnityUITextFieldUI.showTouchScreenKeyboard = false |
UnityEngine.UI.InputField PixelCrushers.DialogueSystem.UnityUITextFieldUI.textField |
The text field.