Exemple #1
0
    //--------------------------------------
    // INITIALIZE
    //--------------------------------------

    //--------------------------------------
    //  PUBLIC METHODS
    //--------------------------------------

    void OnGUI()
    {
        UpdateToStartPos();

        GUI.Label(new Rect(StartX, StartY, Screen.width, 40), "Native Pop Ups", style);
        StartY += YLableStep;


        if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Rate PopUp with events"))
        {
            WP8RateUsPopUp rate = WP8RateUsPopUp.Create("Like this game?", "Please rate to support future updates!");
            rate.addEventListener(BaseEvent.COMPLETE, onRatePopUpClose);
        }


        StartX += XButtonStep;
        if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Dialog PopUp"))
        {
            WP8Dialog dialog = WP8Dialog.Create("Dialog Titile", "Dialog message");
            dialog.addEventListener(BaseEvent.COMPLETE, onDialogClose);
        }


        StartX += XButtonStep;
        if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Message PopUp"))
        {
            WP8Message msg = WP8Message.Create("Message Titile", "Message message");
            msg.addEventListener(BaseEvent.COMPLETE, onMessageClose);
        }

        StartX += XButtonStep;
        if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Show Preloader"))
        {
            WP8NativeUtils.ShowPreloader();
            Invoke("HidePreloader", 2f);
        }
    }
Exemple #2
0
    //--------------------------------------
    //  GET/SET
    //--------------------------------------

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

    private void HidePreloader()
    {
        WP8NativeUtils.HidePreloader();
    }