Example #1
0
 static void OnResult(GuiPopup popup, E_PopupResultCode result)
 {
     /*if ( m_Popup == popup )
      * {
      *      m_Popup.SetButtonVisible( true );
      * }*/
 }
Example #2
0
 void ForgotPasswordHandler(GuiPopup inPopup, E_PopupResultCode inResult)
 {
     if (inResult != E_PopupResultCode.Cancel)
     {
         Owner.ShowPopup("MessageBox", TextDatabase.instance[0103044], TextDatabase.instance[inResult == E_PopupResultCode.Ok ? 0103047 : 0103042]);
     }
 }
Example #3
0
 static void OnResult(GuiPopup popup, E_PopupResultCode result)
 {
     if (m_Popup == popup)
     {
         m_Popup.SetButtonVisible(true);
     }
 }
Example #4
0
 void MigrateGuestResult(GuiPopup popup, E_PopupResultCode result)
 {
     if (result == E_PopupResultCode.Cancel)
     {
         base.ShowScreen("PlayerProfile", false);
     }
 }
Example #5
0
    // ------
    void ResetWaitResultHandler(GuiPopup inPopup, E_PopupResultCode inResult)
    {
        //Debug.Log("Waiting for buy finished. popup: " + inResult + " action status " + BuyActionStatus);
        if (inResult == E_PopupResultCode.Success)
        {
            if (m_ResetCloudAction != null && m_ResetCloudAction.isSucceeded == true)
            {
                //Debug.Log(Time.realtimeSinceStartup + " " + m_ResetCloudAction.status);
            }

            Owner.Back();
            ResearchSupport.Instance.AnyResearchItemChanged();
            SendResult(E_PopupResultCode.Success);
        }
        else
        {
            Owner.Back();
            SendResult(E_PopupResultCode.Failed);
        }

        m_Cost                  = 0;
        m_RefundedMoney         = 0;
        m_ResearchGUIDs         = null;
        m_ResetCloudAction      = null;
        m_CheckEquipCloudAction = null;
    }
Example #6
0
    // PROTECTED METHODS

    protected void SendResult(E_PopupResultCode inResult)
    {
        if (m_ResultHandler != null)
        {
            m_ResultHandler(this, inResult);
        }
    }
Example #7
0
 void ExitHandler(GuiPopup inPopup, E_PopupResultCode inResult)
 {
     if (inResult == E_PopupResultCode.Ok)
     {
         QuitApplication();
     }
 }
Example #8
0
 // ------
 void DoUpgradeResultHandler(GuiPopup inPopup, E_PopupResultCode inResult)
 {
     if (inResult == E_PopupResultCode.Ok)
     {
         SetItem(m_ResearchItem);             // refresh data after upgrade
     }
 }
    protected override void OnPopupHides(E_PopupResultCode result)
    {
        CloudUser.instance.LogoutLocalUser();
        GuiFrontendMain.ShowLoginMenu();

        base.OnPopupHides(result);
    }
    protected override void OnPopupHides(E_PopupResultCode result)
    {
        HasInstant           = false;
        HasConditional       = false;
        GuideData.ShowOffers = false;

        base.OnPopupHides(result);
    }
Example #11
0
    protected override void OnPopupHides(E_PopupResultCode result)
    {
        // user closed popup,
        // we can update local ppi now
        FetchPPIFromCloud();

        base.OnPopupHides(result);
    }
Example #12
0
 // ------
 void DoResearchResultHandler(GuiPopup inPopup, E_PopupResultCode inResult)
 {
     SetItem(m_ResearchItem);
     if (inResult == E_PopupResultCode.Success)
     {
         //Owner.Back();
     }
 }
Example #13
0
    void OnFeedbackConfirmation(GuiPopup inPopup, E_PopupResultCode inResult)
    {
        if (inResult != E_PopupResultCode.Ok)
        {
            return;
        }

        ShowFeedbackForm();
    }
Example #14
0
        //-------------------------------------------------------------------------------------------------------------
        static void OnResult(GuiPopup popup, E_PopupResultCode result)
        {
            m_Popup.SetButtonVisible(true);

            if (m_Handler != null)
            {
                m_Handler(popup, result);
            }
        }
Example #15
0
 void BuyResultHandler(GuiPopup inPopup, E_PopupResultCode inResult)
 {
     if (inResult == E_PopupResultCode.Success || inResult == E_PopupResultCode.Cancel)
     {
         //success
         //ShopItemId selItem = m_ItemScroller.GetSelectedItem();
         UpdateItemButtons();
     }
 }
Example #16
0
 void BuyResultHandler(GuiPopup inPopup, E_PopupResultCode inResult)
 {
     if (inResult == E_PopupResultCode.Success || inResult == E_PopupResultCode.Cancel)
     {
         //success
         ShopItemId selItem = m_ShopScroller.GetSelectedItem();
         UpdateBuyButton(selItem);
         UpdateCurrentPage(selItem, true);
     }
 }
Example #17
0
 // ------
 void ResetTreeResultHandler(GuiPopup inPopup, E_PopupResultCode inResult)
 {
     //if(inResult == E_PopupResultCode.Success)
     {
         foreach (ResearchItem item in m_Items)
         {
             item.StateChanged();
         }
     }
 }
Example #18
0
    // HANDLERS

    void OnLeaveConfirmation(GuiPopup inPopup, E_PopupResultCode inResult)
    {
        if (inResult != E_PopupResultCode.Ok)
        {
            return;
        }

        //Debug.Log("Exiting game");

        GuiFrontendIngame.GotoMainMenu();
    }
Example #19
0
    // HANDLERS

    void OnAuthenticationResult(GuiPopup inPopup, E_PopupResultCode inResult)
    {
        if (inResult == E_PopupResultCode.Success)
        {
            Exit();
        }
        else
        {
            ShowScreen("FirstLogin", true);
        }
    }
Example #20
0
    // HANDLERS

    void OnLogoutConfirmation(GuiPopup inPopup, E_PopupResultCode inResult)
    {
        if (inResult != E_PopupResultCode.Ok)
        {
            return;
        }

        CloudUser.instance.LogoutLocalUser();

        GuiFrontendMain.ShowLoginMenu();
    }
Example #21
0
 void AuthenticationResultHandler(GuiPopup inPopup, E_PopupResultCode inResult)
 {
     if (inResult == E_PopupResultCode.Success)
     {
         // close login menu
         Owner.Exit();
     }
     else
     {
         //Owner.Back();
     }
 }
    //-----------------------------------------------------------------------------------------------------------------
    void InternalPopupHandler(GuiPopup inPopup, E_PopupResultCode inResult)
    {
        switch (inResult)
        {
        // forcefully closed
        case E_PopupResultCode.Failed:
            SendEvent(E_Event.Closed);
            return;

        // unhandled cases
        default:
            break;
        }

        Debug.Log("Unhandled popup result: " + inResult);
    }
Example #23
0
    void CloseDialog(E_PopupResultCode res, int msgTextId)
    {
        //Debug.Log("IAP Close Dialog: " + TextDatabase.instance[msgTextId]);

        //store result
        m_Result = res;

        //clean request
        ShopDataBridge.Instance.IAPCleanRequest();

#if !IAP_USE_MFLIVE //when using MFLive, we don't know the real result
        //show result and button for dialog close
        m_CaptionLabel.SetNewText(TextDatabase.instance[02030046]);
        m_StatusLabel.SetNewText(TextDatabase.instance[msgTextId]);
#endif
        m_CloseButton.Widget.Show(true, true);
        m_CloseButton.RegisterReleaseDelegate(OnCloseButton);
    }
Example #24
0
    void BuyWaitResultHandler(GuiPopup inPopup, E_PopupResultCode inResult)
    {
        //Debug.Log("Waiting for buy finished. popup: " + inResult + " action status " + BuyActionStatus);
        if (inResult == E_PopupResultCode.Success)
        {
            CloseDialog();
            SendResult(E_PopupResultCode.Success);
        }
        else
        {
            //buy failed
            string strBuyFailed = TextDatabase.instance[02030042];
            Owner.ShowPopup("ShopMessageBox", "", strBuyFailed, FailMessageBoxHandler);
        }

        m_BuyItemId      = ShopItemId.EmptyId;
        m_BuyCloudAction = null;
    }
Example #25
0
    void SelectFriendPopupHandler(GuiPopup inPopup, E_PopupResultCode inResult)
    {
        SelectFriendDialog popup = inPopup as SelectFriendDialog;

        if (popup == null)
        {
            Debug.LogError("This handler can be used only with SelectFriendDialog !!!");
            return;
        }

        if (popup.selectedFriend == SelectFriendDialog.SHOW_BEST_RESULTS)
        {
            m_StatisticsView.SetStatisticsMode(Statistics.E_Mode.CompareWithBest, "");
        }
        else
        {
            m_StatisticsView.SetStatisticsMode(Statistics.E_Mode.CompareWithFriend, popup.selectedFriend);
        }
    }
Example #26
0
    void BuyWaitResultHandler(GuiPopup inPopup, E_PopupResultCode inResult)
    {
        //Debug.Log("Waiting for buy finished. popup: " + inResult + " action status " + BuyActionStatus);
        if (inResult == E_PopupResultCode.Success)
        {
            Owner.Back();
            ResearchSupport.Instance.AnyResearchItemChanged();
            m_ResearchItem.StateChanged();
            SendResult(E_PopupResultCode.Success);
        }
        else
        {
            Owner.Back();
            SendResult(E_PopupResultCode.Failed);
        }

        m_ResearchItem          = null;
        m_BuyCloudAction        = null;
        m_CheckEquipCloudAction = null;
    }
Example #27
0
	// ------
	void BuyWaitResultHandler(GuiPopup inPopup, E_PopupResultCode inResult)
	{
		//Debug.Log("Waiting for buy finished. popup: " + inResult + " action status " + BuyActionStatus);
		if (inResult == E_PopupResultCode.Success)
		{
			Owner.Back();
			m_ResearchItem.StateChanged();
			SendResult(E_PopupResultCode.Ok);
		}
		else
		{
			Owner.Back();
			SendResult(E_PopupResultCode.Failed);
		}

		m_ResearchItem = null;
#if !TEMPORARY_UPGRADE_HACK
		m_UpgradeCloudAction = null;
#endif
	}
Example #28
0
    //-----------------------------------------------------------------------------------------------------------------
    void OnMessageBoxEvent(GuiPopup popup, E_PopupResultCode result)
    {
        if (m_IsConnectingToLobby)
        {
            m_IsConnectingToLobby = false;
            LobbyClient.ToLobbyConnectionResult -= OnLobbyConnectionResult;
        }

        if (m_IsLookingForServer)
        {
            if (result == E_PopupResultCode.Ok)             // User pressed the cancel button
            {
                LobbyClient.CancelFindServer(m_LastJoinRequestId);
            }

            m_IsLookingForServer = false;
        }

        if (m_IsConnectingToServer)
        {
            m_IsConnectingToServer = false;
        }
    }
Example #29
0
    IEnumerator CheckGuestAccount_Coroutine(string primaryKey, string password)
    {
        GetPublicUserData getUserAccountType =
            new GetPublicUserData(primaryKey, CloudServices.PROP_ID_ACCT_KIND);

        GameCloudManager.AddAction(getUserAccountType);

        while (!getUserAccountType.isDone)
        {
            yield return(new WaitForEndOfFrame());
        }

        E_PopupResultCode migrateResult = E_PopupResultCode.Cancel;

        if (!getUserAccountType.isFailed && !string.IsNullOrEmpty(getUserAccountType.result) &&
            getUserAccountType.result == E_UserAcctKind.Guest.ToString())
        {
            m_MigrationOffered = true;
            bool migrateFinished = false;
            GuiPopupMigrateGuest migratePopup = (GuiPopupMigrateGuest)ShowPopup("MigrateGuest", null, null, (popup, result) =>
            {
                migrateResult   = result;
                migrateFinished = true;
            });
            migratePopup.Usage      = GuiPopupMigrateGuest.E_Usage.LoginMenu;
            migratePopup.PrimaryKey = primaryKey;
            migratePopup.Password   = password;
            while (!migrateFinished)
            {
                yield return(new WaitForEndOfFrame());
            }

            migratePopup.HideView(this);
        }

        StartLogin(migrateResult == E_PopupResultCode.Cancel);
    }
    protected override void OnPopupHides(E_PopupResultCode result)
    {
        NotifyUser = false;

        base.OnPopupHides(result);
    }