Poups and Pre-loaders

Message Popup

WP8Message msg = new WP8Message("Message Title", "Message message");


Result for this API call is showed below:


If you need to find out when message is closed you should add listener:

msg.addEventListener(BaseEvent.COMPLETE, OnMessageClose);

OnMessageClose function will be called as soon as pop-up is closed.

OnMessageClose function example:

private void OnMessageClose(CEvent e) {
   //removing listener
   e.dispatcher.removeEventListener(BaseEvent.COMPLETE,  OnMessageClose);
   new WP8Message("Result", "Message Closed");


Dialog Popup

WP8Dialog dialog = new WP8Dialog("Dialog Title", "Dialog message");

Result for this API call is showed below:


If you need to find out dialog result you  should add listener:

dialog.addEventListener(BaseEvent.COMPLETE, OnDialogClose);

OnDialogClose function will be called as soon as popup is closed.

OnDialogClose function example:

private void OnDialogClose(CEvent e) {
     //removing listner
    e.dispatcher.removeEventListener(BaseEvent.COMPLETE, OnDialogClose);
    //parsing result
    switch((WP8DialogResult)e.data) {
    case WP8DialogResult.YES:
        Debug.Log ("Yes button pressed");
    case WP8DialogResult.NO:
        Debug.Log ("No button pressed");



Rate Popup

WP8RateUsPopUp ratePopUp =  new WP8RateUsPopUp("Like this game?", "Please rate to support future updates!");


Dialog popup will be created, but Yes option will redirect to the rating page as on the screenshot below


If you need to find out pop-up result you  should add listener:

ratePopUp.addEventListener(BaseEvent.COMPLETE, OnRatePopUpClose);

OnRatePopUpClose function will be called as soon as popup is closed.

OnRatePopUpClose function example:

private void OnRatePopUpClose(CEvent e) {
        //removing listner
        e.dispatcher.removeEventListener(BaseEvent.COMPLETE, OnRatePopUpClose);
        //parsing result
        switch((WP8DialogResult)e.data) {
        case WP8DialogResult.RATED:
            Debug.Log ("Rate Option pickied");
        case WP8DialogResult.DECLINED:
            Debug.Log ("Declined Option pickied");



Show Preloader



Hide Preloader



Note: While preloader shown all input will be blocked.