Пример #1
0
 // Dialog Button click event
 public void OnDialogInfo()
 {
     NativeDialog.OpenDialog("Info popup", "Welcome To Native Popup", "Ok",
                             () => {
         DebugLog("OK Button pressed");
     });
 }
Пример #2
0
    // Dialog Button click event
    public void OnDialogPopUp()
    {
        NativeDialog dialog = new NativeDialog("TheAppGuruz", "Do you wants to know about TheAppGuruz");

        dialog.SetUrlString("http://theappguruz.com/");
        dialog.init();
    }
Пример #3
0
 public void OnDialogConfirm()
 {
     NativeDialog.OpenDialog("Confirm popup", "Do you wants about app?", "Yes", "No",
                             () => {
         DebugLog("Yes Button pressed");
     },
                             () => {
         DebugLog("No Button pressed");
     });
 }
Пример #4
0
        public void ShowChangeNameValidationError(string message)
        {
#if UNITY_EDITOR
            Debug.Log("Show change name validation error dialog");
#else
            NativeDialog.OpenDialog(_config.ChangeNameValidationErrorTitle,
                                    message, _config.OkText,
                                    () => { });
#endif
        }
Пример #5
0
        public void ShowChangeNameSuccessDialog()
        {
#if UNITY_EDITOR
            Debug.Log("Show change name success dialog");
#else
            NativeDialog.OpenDialog(_config.ChangeNameSuccessTitle,
                                    _config.ChangeNameSuccessBody, _config.OkText,
                                    () => { });
#endif
        }
Пример #6
0
        public void ShowScoreUpdateErrorDialog()
        {
#if UNITY_EDITOR
            Debug.Log("Show score update error dialog");
#else
            NativeDialog.OpenDialog(_config.ScoreUpdateErrorTitle,
                                    _config.ScoreUpdateErrorBody, _config.OkText,
                                    () => { });
#endif
        }
Пример #7
0
        public void ShowUpdateRequestDialog(string title, string message, UnityAction onOk)
        {
#if UNITY_EDITOR
            Debug.Log("Show update request dialog: ");
            onOk?.Invoke();
#else
            NativeDialog.OpenDialog(title, message, _config.UpdateButton,
                                    () => { onOk?.Invoke(); });
#endif
        }
Пример #8
0
        public void ShowMaintenanceDialog(string title, string message, UnityAction onOk)
        {
#if UNITY_EDITOR
            Debug.Log("Show maintenance dialog: " + title + message);
            onOk?.Invoke();
#else
            NativeDialog.OpenDialog(title, message, _config.OkText,
                                    () => { onOk?.Invoke(); });
#endif
        }
Пример #9
0
        public void ShowConnectionErrorDialog(UnityAction onRetry, UnityAction onCancel)
        {
            #if UNITY_EDITOR
            Debug.Log("Show connection error dialog");
            onRetry?.Invoke();
#else
            NativeDialog.OpenDialog(_config.ConnectionErrorTitle, _config.ConnectionErrorBody, _config.RetryText, _config.CancelText,
                                    () => { onRetry?.Invoke(); },
                                    () => { onCancel?.Invoke(); });
#endif
        }
Пример #10
0
 public void OnTimePicker()
 {
     NativeDialog.OpenTimePicker(
         (DateTime _date) =>
     {
         DebugLog(_date.ToString());
     },
         (DateTime _date) =>
     {
         DebugLog(_date.ToString());
     });
 }
Пример #11
0
 public void OnDatePicker()
 {
     NativeDialog.OpenDatePicker(1992, 5, 10,
                                 (DateTime _date) =>
     {
         DebugLog(_date.ToString());
     },
                                 (DateTime _date) =>
     {
         DebugLog(_date.ToString());
     });
 }
Пример #12
0
 public void OnDialogNeutral()
 {
     NativeDialog.OpenDialog("Like this game?", "Please rate to support future updates!", "Rate app", "later", "No, thanks",
                             () =>
     {
         DebugLog("Rate Button pressed");
     },
                             () =>
     {
         DebugLog("Later Button pressed");
     },
                             () =>
     {
         DebugLog("No Button pressed");
     });
 }