protected override void ShowSingleFieldPromptDialog(string _title, string _message, string _placeholder, bool _useSecureText, string[] _buttonsList, SingleFieldPromptCompletion _onCompletion) { base.ShowSingleFieldPromptDialog (_title, _message, _placeholder, _useSecureText, _buttonsList, _onCompletion); // Show prompt Plugin.Call(NativeInfo.Methods.SHOW_SINGLE_FIELD_PROMPT, _title, _message, _placeholder, _useSecureText, _buttonsList.ToJSON()); }
protected override void ShowSingleFieldPromptDialog (string _title, string _message, string _placeholder, bool _useSecureText, string[] _buttonsList, SingleFieldPromptCompletion _onCompletion) { base.ShowSingleFieldPromptDialog (_title, _message, _placeholder, _useSecureText, _buttonsList, _onCompletion); // Show prompt showSingleFieldPromptDialog(_title, _message, _placeholder, _useSecureText, _buttonsList.ToJSON()); }
protected virtual void ShowSingleFieldPromptDialog(string _title, string _message, string _placeholder, bool _useSecureText, string[] _buttonsList, SingleFieldPromptCompletion _onCompletion) { // Cache callback OnSingleFieldPromptClosed = _onCompletion; }
/// <summary> /// Shows a prompt dialog that allows the user to enter obscure text. /// </summary> /// <param name="_title">The string that appears in the title bar.</param> /// <param name="_message">Descriptive text that provides more details than the title.</param> /// <param name="_placeholder">The string that is displayed when there is no other text in the textfield.</param> /// <param name="_buttonsList">An array of string values, used as title of action buttons.</param> /// <param name="_onCompletion">Callback that will be called after operation is completed.</param> public void ShowSingleFieldPromptDialogWithSecuredText(string _title, string _message, string _placeholder, string[] _buttons, SingleFieldPromptCompletion _onCompletion) { ShowSingleFieldPromptDialog(_title, _message, _placeholder, true, _buttons, _onCompletion); }
/// <summary> /// Shows a prompt dialog that allows the user to enter text. /// </summary> /// <param name="_title">The string that appears in the title bar.</param> /// <param name="_message">Descriptive text that provides more details than the title.</param> /// <param name="_placeholder">The string that is displayed when there is no other text in the textfield.</param> /// <param name="_buttonsList">An array of string values, used as title of action buttons.</param> /// <param name="_onCompletion">Callback that will be called after operation is completed.</param> /// <example> /// The following code example demonstrates how to prompt user to enter profile name. /// <code> /// using UnityEngine; /// using System.Collections; /// using VoxelBusters.NativePlugins; /// /// public class ExampleClass : MonoBehaviour /// { /// public void ShowPromptDialog () /// { /// string[] _buttons = new string[] { /// "Ok", /// "Cancel" /// }; /// /// NPBinding.UI.ShowSingleFieldPromptDialogWithPlainText("Profile", "Please enter a profile name to store your game progress.", "username", _buttons, OnButtonPressed); /// } /// /// private void OnButtonPressed (string _buttonPressed, string _inputText) /// { /// Debug.Log("Button pressed: " + _buttonPressed); /// Debug.Log("Input text: " + _inputText); /// } /// } /// </code> /// </example> public void ShowSingleFieldPromptDialogWithPlainText(string _title, string _message, string _placeholder, string[] _buttonsList, SingleFieldPromptCompletion _onCompletion) { ShowSingleFieldPromptDialog(_title, _message, _placeholder, false, _buttonsList, _onCompletion); }
protected override void ShowSingleFieldPromptDialog(string _title, string _message, string _placeholder, bool _useSecureText, string[] _buttonsList, SingleFieldPromptCompletion _onCompletion) { base.ShowSingleFieldPromptDialog(_title, _message, _placeholder, _useSecureText, _buttonsList, _onCompletion); // Show prompt Plugin.Call(Native.Methods.SHOW_SINGLE_FIELD_PROMPT, _title, _message, _placeholder, _useSecureText, _buttonsList.ToJSON()); }
protected override void ShowSingleFieldPromptDialog(string _title, string _message, string _placeholder, bool _useSecureText, string[] _buttonsList, SingleFieldPromptCompletion _onCompletion) { base.ShowSingleFieldPromptDialog(_title, _message, _placeholder, _useSecureText, _buttonsList, _onCompletion); EditorUIHandler.Instance.ShowSingleFieldPromptDialog(_title, _message, _placeholder, _useSecureText, _buttonsList, GetGUISkin()); }
protected override void ShowSingleFieldPromptDialog(string _title, string _message, string _placeholder, bool _useSecureText, string[] _buttonsList, SingleFieldPromptCompletion _onCompletion) { base.ShowSingleFieldPromptDialog(_title, _message, _placeholder, _useSecureText, _buttonsList, _onCompletion); // Show prompt showSingleFieldPromptDialog(_title, _message, _placeholder, _useSecureText, _buttonsList.ToJSON()); }