コード例 #1
0
        void ShowInner()
        {
            OnceInitializeAction?.Invoke();

            var payload = new LoadingDialogPayload(ContentView, _loadingView);

            var bundle = new Bundle();

            bundle.PutSerializable(LoadingDialogPayload.PayloadKey, payload);
            PlatformDialog.Arguments = bundle;

            PlatformDialog.Show(FragmentManager, LoadingImplementation.LoadingDialogTag);
        }
コード例 #2
0
 public void MoneyHack()
 {
     PlatformDialog.SetButtonLabel(LanguageManager.Instance.GetTextValue("OK"));
     PlatformDialog.Show(
         "Money Hack",
         "Added 1000 Gold Thanks",
         PlatformDialog.Type.SubmitOnly,
         () => {
         PlayerPrefs.SetInt("CoinGold", PlayerPrefs.GetInt("CoinGold") + 1000);
         Debug.Log("OK");
     },
         null
         );          // handle success or failure
 }
コード例 #3
0
 private void OKPanel()
 {
     PlatformDialog.SetButtonLabel(LanguageManager.Instance.GetTextValue("OK"));
     PlatformDialog.Show(
         LanguageManager.Instance.GetTextValue("Warning"),
         LanguageManager.Instance.GetTextValue("Restart"),
         PlatformDialog.Type.SubmitOnly,
         () => {
         Debug.Log("OK");
         Application.Quit();
     },
         null
         );
 }
コード例 #4
0
    void OnGUI()
    {
        if (GUILayout.Button("show dialog 1"))
        {
            PlatformDialog.SetButtonLabel("OK", "Cancel");
            PlatformDialog.Show(
                "message",
                PlatformDialog.Type.OKCancel,
                () => {
                Debug.Log("OK");
            },
                () => {
                Debug.Log("Cancel");
            }
                );

            StartCoroutine(AutoClose());
        }

        if (GUILayout.Button("show dialog 2"))
        {
            PlatformDialog.SetButtonLabel("Yes", "No");
            PlatformDialog.Show(
                "title",
                "message",
                PlatformDialog.Type.OKCancel,
                () => {
                Debug.Log("Yes");
            },
                () => {
                Debug.Log("No");
            }
                );
        }

        if (GUILayout.Button("show dialog 3"))
        {
            PlatformDialog.SetButtonLabel("OK");
            PlatformDialog.Show(
                "title",
                "message",
                PlatformDialog.Type.SubmitOnly,
                () => {
                Debug.Log("OK");
            },
                null
                );
        }
    }
コード例 #5
0
        public void Show(string message = null, bool isCurrentScope = false)
        {
            OnceInitializeAction?.Invoke();

            var payload = new LoadingDialogPayload(ContentView);

            var bundle = new Bundle();

            bundle.PutSerializable(LoadingDialogPayload.PayloadKey, payload);
            PlatformDialog.Arguments = bundle;

            _message           = message ?? _config.DefaultMessage;
            _messageLabel.Text = _message;

            PlatformDialog.Show(FragmentManager, LoadingImplementation.LoadingDialogTag);
        }
コード例 #6
0
 public void Sign()
 {
     Social.localUser.Authenticate((bool success) => {
         if (!success)
         {
             PlatformDialog.SetButtonLabel(LanguageManager.Instance.GetTextValue("OK"));
             PlatformDialog.Show(
                 LanguageManager.Instance.GetTextValue("Warning"),
                 LanguageManager.Instance.GetTextValue("Unable"),
                 PlatformDialog.Type.SubmitOnly,
                 () => {
                 Debug.Log("OK");
             },
                 null
                 );                  // handle success or failure
         }
     });
 }
コード例 #7
0
    public void CloseApp()
    {
        PlatformDialog.SetButtonLabel(LanguageManager.Instance.GetTextValue("Yes"), LanguageManager.Instance.GetTextValue("No"));
        PlatformDialog.Show(
            LanguageManager.Instance.GetTextValue("Warning"),
            LanguageManager.Instance.GetTextValue("GoodPerson"),
            PlatformDialog.Type.OKCancel,
            () => {
            Debug.Log("Yes");
            PlatformDialog.Dismiss();
        },
            () => {
            Debug.Log("No");

            /*LocalNotification.SendRepeatingNotification(2, 15, 60, "Can you solve?", "Try and see :)", new Color32(0xff, 0x44, 0x44, 255),true,false,true);
             * sleepUntil = Time.time + 99999;*/
            Debug.Log("Notification 2 Active");
            Application.Quit();
        }
            );
    }
コード例 #8
0
    private IEnumerator AutoClose()
    {
        yield return(new WaitForSeconds(10.0f));

        PlatformDialog.Dismiss();
    }