示例#1
0
 static void OnResult(GuiPopup popup, E_PopupResultCode result)
 {
     /*if ( m_Popup == popup )
      * {
      *      m_Popup.SetButtonVisible( true );
      * }*/
 }
示例#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]);
     }
 }
示例#3
0
 static void OnResult(GuiPopup popup, E_PopupResultCode result)
 {
     if (m_Popup == popup)
     {
         m_Popup.SetButtonVisible(true);
     }
 }
示例#4
0
 void MigrateGuestResult(GuiPopup popup, E_PopupResultCode result)
 {
     if (result == E_PopupResultCode.Cancel)
     {
         base.ShowScreen("PlayerProfile", false);
     }
 }
示例#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;
    }
示例#6
0
    // PROTECTED METHODS

    protected void SendResult(E_PopupResultCode inResult)
    {
        if (m_ResultHandler != null)
        {
            m_ResultHandler(this, inResult);
        }
    }
示例#7
0
 void ExitHandler(GuiPopup inPopup, E_PopupResultCode inResult)
 {
     if (inResult == E_PopupResultCode.Ok)
     {
         QuitApplication();
     }
 }
示例#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);
    }
示例#10
0
    protected override void OnPopupHides(E_PopupResultCode result)
    {
        HasInstant           = false;
        HasConditional       = false;
        GuideData.ShowOffers = false;

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

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

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

            if (m_Handler != null)
            {
                m_Handler(popup, result);
            }
        }
示例#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();
     }
 }
示例#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);
     }
 }
示例#17
0
 // ------
 void ResetTreeResultHandler(GuiPopup inPopup, E_PopupResultCode inResult)
 {
     //if(inResult == E_PopupResultCode.Success)
     {
         foreach (ResearchItem item in m_Items)
         {
             item.StateChanged();
         }
     }
 }
示例#18
0
    // HANDLERS

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

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

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

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

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

        CloudUser.instance.LogoutLocalUser();

        GuiFrontendMain.ShowLoginMenu();
    }
示例#21
0
 void AuthenticationResultHandler(GuiPopup inPopup, E_PopupResultCode inResult)
 {
     if (inResult == E_PopupResultCode.Success)
     {
         // close login menu
         Owner.Exit();
     }
     else
     {
         //Owner.Back();
     }
 }
示例#22
0
    //-----------------------------------------------------------------------------------------------------------------
    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);
    }
示例#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);
    }
示例#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;
    }
示例#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);
        }
    }
示例#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;
    }
示例#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
	}
示例#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;
        }
    }
示例#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);
    }