protected override void OnPopupHides(E_PopupResultCode result)
    {
        CloudUser.instance.LogoutLocalUser();
        GuiFrontendMain.ShowLoginMenu();

        base.OnPopupHides(result);
    }
Ejemplo n.º 2
0
    // MONOBEHAVIOUR INTERFACE

    void Start()
    {
        m_Instance = this;

        RegisterMenu <GuiMenuLogin>(E_MenuState.Login);
        RegisterMenu <GuiMenuMain>(E_MenuState.Menu);
    }
Ejemplo n.º 3
0
    // HANDLERS

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

        CloudUser.instance.LogoutLocalUser();

        GuiFrontendMain.ShowLoginMenu();
    }
Ejemplo n.º 4
0
    public static void Clear()
    {
        if (m_Instance == null)
        {
            return;
        }

        m_Instance.SetState(E_MenuState.Idle);
        m_Instance.StopAllCoroutines();
        m_Instance.CancelInvoke();
        m_Instance = null;
    }
Ejemplo n.º 5
0
    public static GuiPopupConfirmDialog ShowConfirmDialog(string caption, string text, PopupHandler handler = null)
    {
        if (GuiFrontendMain.IsVisible == true)
        {
            return(GuiFrontendMain.ShowConfirmDialog(caption, text, handler));
        }
        else if (GuiFrontendIngame.IsVisible == true || GuiFrontendIngame.IsHudVisible == true)
        {
            return(GuiFrontendIngame.ShowConfirmDialog(caption, text, handler));
        }

        return(null);
    }
Ejemplo n.º 6
0
    public static GuiPopupMessageBox ShowMessageBox(string caption, string text, PopupHandler handler = null)
    {
        if (GuiFrontendMain.IsVisible == true)
        {
            return(GuiFrontendMain.ShowMessageBox(caption, text, handler));
        }
        else if (GuiFrontendIngame.IsVisible == true || GuiFrontendIngame.IsHudVisible == true)
        {
            return(GuiFrontendIngame.ShowMessageBox(caption, text, handler));
        }

        return(null);
    }
Ejemplo n.º 7
0
    bool JoinGang(string master)
    {
        m_Master = master;

        m_Chat.Channel = string.Format(LobbyGangChat.CHANNEL, m_Master);

        if (IsVisible == false)
        {
            GuiFrontendMain.ShowPopup("LobbyGangGuest", "", "");
        }
        else
        {
            SetDirty();
        }

        return(true);
    }
Ejemplo n.º 8
0
    IEnumerator JoinGang_Coroutine(string master)
    {
        m_IsJoining = true;

        bool canJoin = GuiFrontendMain.IsVisible;

        if (canJoin == true)
        {
            if (m_Master == null && IsVisible == false)
            {
                var      friend   = GameCloudManager.friendList.friends.Find(obj => obj.PrimaryKey == master);
                string   nickname = GuiBaseUtils.FixNameForGui(friend.Nickname);
                string   caption  = TextDatabase.instance[0109064];              //string.Format(TextDatabase.instance[0109064], nickname);
                string   text     = string.Format(TextDatabase.instance[0109065], nickname);
                GuiPopup popup    = GuiFrontendMain.ShowPopup("ConfirmDialog",
                                                              caption,
                                                              text,
                                                              (inPopup, inResult) =>
                {
                    if (inResult != E_PopupResultCode.Ok)
                    {
                        canJoin = false;
                    }
                });

                while (popup.IsVisible == true)
                {
                    yield return(new WaitForEndOfFrame());

                    if (m_IsJoining == false)
                    {
                        popup.ForceClose();
                    }
                }
            }

            if (canJoin == true)
            {
                canJoin = JoinGang(master);
            }
        }

        UpdateStatus(master, canJoin);

        m_IsJoining = false;
    }
Ejemplo n.º 9
0
    // ISCREENOWNER INTERFACE

    public override void Exit()
    {
        GuiFrontendMain.StartMainMenuOrCommand();
    }
Ejemplo n.º 10
0
    void InfoPopupConfirmation(GuiPopup popup, E_PopupResultCode result)
    {
        CloudUser.instance.LogoutLocalUser();

        GuiFrontendMain.ShowLoginMenu();
    }