Exemple #1
0
    public MNRateUsPopup(string title, string message, string rateUs, string decline, string remind) : base(title, message)
    {
        AddAction(remind, () => {
            if (remindListener != null)
            {
                remindListener.Invoke();
            }
        });

        AddAction(decline, () => {
            if (declineListener != null)
            {
                declineListener.Invoke();
            }
        });

        AddAction(rateUs, () => {
                                                #if UNITY_ANDROID
            MNAndroidNative.RedirectStoreRatingPage(androidAppUrl);
                                                #elif UNITY_IOS
            MNIOSNative.RedirectToAppStoreRatingPage(appleId);
                                                #endif

            if (rateUsListener != null)
            {
                rateUsListener.Invoke();
            }
        });
    }
Exemple #2
0
    public static void ShowPreloader(string title, string message)
    {
                #if UNITY_ANDROID
        MNAndroidNative.ShowPreloader(title, message, MNP_PlatformSettings.Instance.AndroidDialogTheme);
                #endif

                #if UNITY_IPHONE
        MNIOSNative.ShowPreloader();
                #endif
    }
Exemple #3
0
    public static void HidePreloader()
    {
                #if UNITY_ANDROID
        MNAndroidNative.HidePreloader();
                #endif


                #if UNITY_IPHONE
        MNIOSNative.HidePreloader();
                #endif
    }
Exemple #4
0
    public static void ShowPreloader(string title, string message)
    {
                #if UNITY_ANDROID
        MNAndroidNative.ShowPreloader(title, message);
                #endif

                #if UNITY_IPHONE
        MNIOSNative.ShowPreloader();
                #endif

                #if UNITY_WP8 || UNITY_METRO
        WP8PopUps.PopUp.ShowPreLoader(100);
                #endif
    }
Exemple #5
0
    public static void HidePreloader()
    {
                #if UNITY_ANDROID
        MNAndroidNative.HidePreloader();
                #endif


                #if UNITY_IPHONE
        MNIOSNative.HidePreloader();
                #endif


                #if UNITY_WP8 || UNITY_METRO
        WP8PopUps.PopUp.HidePreLoader();
                #endif
    }
Exemple #6
0
    //--------------------------------------
    //  PUBLIC METHODS
    //--------------------------------------

    public void Show()
    {
        StringBuilder        builder    = new StringBuilder();
        IEnumerator <string> enumerator = actions.GetEnumerator();

        if (enumerator.MoveNext())
        {
            builder.Append(enumerator.Current);
        }

        while (enumerator.MoveNext())
        {
            builder.Append("|");
            builder.Append(enumerator.Current);
        }

        MNAndroidNative.showMessage(title, message, builder.ToString(), MNP_PlatformSettings.Instance.AndroidDialogTheme);
    }
Exemple #7
0
    //--------------------------------------
    //  GET/SET
    //--------------------------------------

    //--------------------------------------
    //  EVENTS
    //--------------------------------------

    public void onPopUpCallBack(string buttonIndex)
    {
        int index = System.Convert.ToInt16(buttonIndex);

        switch (index)
        {
        case 0:
            MNAndroidNative.RedirectStoreRatingPage(url);
            dispatch(BaseEvent.COMPLETE, MNDialogResult.RATED);
            break;

        case 1:
            dispatch(BaseEvent.COMPLETE, MNDialogResult.REMIND);
            break;

        case 2:
            dispatch(BaseEvent.COMPLETE, MNDialogResult.DECLINED);
            break;
        }



        Destroy(gameObject);
    }
    //--------------------------------------
    //  PUBLIC METHODS
    //--------------------------------------

    public void init()
    {
        MNAndroidNative.showMessage(title, message, ok);
    }
    //--------------------------------------
    //  PUBLIC METHODS
    //--------------------------------------

    public void init()
    {
        MNAndroidNative.showMessage(title, message, ok, MNP_PlatformSettings.Instance.AndroidDialogTheme);
    }
Exemple #10
0
    //--------------------------------------
    //  PUBLIC METHODS
    //--------------------------------------


    public void init()
    {
        MNAndroidNative.showRateDialog(title, message, yes, later, no);
    }
Exemple #11
0
    //--------------------------------------
    //  PUBLIC METHODS
    //--------------------------------------


    public void init()
    {
        MNAndroidNative.showRateDialog(title, message, yes, later, no, MNP_PlatformSettings.Instance.AndroidDialogTheme);
    }
 private void Dismiss()
 {
     Debug.Log("DIALOG DISMISS");
     MNAndroidNative.dismissDialog();
 }