Exemple #1
0
    // Token: 0x060008E7 RID: 2279 RVA: 0x000B6480 File Offset: 0x000B4680
    public bool OpenMenu(EGUIWindow eWin, int arg1 = 0, int arg2 = 0, bool bCameraMode = false)
    {
        GUIManager guimanager = GUIManager.Instance;

        if (!(guimanager.FindMenu(eWin) != null))
        {
            guimanager.OpenMenu(eWin, arg1, arg2, bCameraMode, false, false);
            GUIWindowStackData item;
            item.m_eWindow = eWin;
            if (eWin == EGUIWindow.UI_Chat)
            {
                arg1 = 0;
            }
            item.m_Arg1      = arg1;
            item.m_Arg2      = arg2;
            item.bCameraMode = bCameraMode;
            guimanager.m_WindowStack.Add(item);
            if (eWin != EGUIWindow.UI_Chat && eWin != EGUIWindow.UI_OpenBox)
            {
                UIBattle_Gambling uibattle_Gambling = guimanager.FindMenu(EGUIWindow.UI_Battle_Gambling) as UIBattle_Gambling;
                if (uibattle_Gambling != null)
                {
                    uibattle_Gambling.DimPanle.gameObject.SetActive(true);
                }
            }
            else
            {
                UIBattle_Gambling uibattle_Gambling2 = guimanager.FindMenu(EGUIWindow.UI_Battle_Gambling) as UIBattle_Gambling;
                if (uibattle_Gambling2 != null)
                {
                    uibattle_Gambling2.DimPanle.gameObject.SetActive(false);
                }
            }
            guimanager.UpdateUI(EGUIWindow.UI_Battle_Gambling, 11, 0);
            return(true);
        }
        if (guimanager.m_Chat != null && guimanager.m_Chat.activeInHierarchy)
        {
            guimanager.CloseMenu(guimanager.Chatwin.m_eWindow);
            GUIWindowStackData item2;
            item2.m_eWindow   = eWin;
            item2.m_Arg1      = arg1;
            item2.m_Arg2      = arg2;
            item2.bCameraMode = bCameraMode;
            guimanager.m_WindowStack.Add(item2);
            return(true);
        }
        return(false);
    }
Exemple #2
0
    // Token: 0x060008E9 RID: 2281 RVA: 0x000B6880 File Offset: 0x000B4A80
    public bool OnBackButtonClick()
    {
        GUIManager guimanager = GUIManager.Instance;

        if (guimanager.m_WindowStack.Count != 0)
        {
            GUIWindow guiwindow = guimanager.FindMenu(guimanager.m_WindowStack[guimanager.m_WindowStack.Count - 1].m_eWindow);
            if (guiwindow != null && guiwindow.OnBackButtonClick())
            {
                return(true);
            }
            this.CloseMenu(false);
        }
        else
        {
            UIBattle_Gambling uibattle_Gambling = guimanager.FindMenu(EGUIWindow.UI_Battle_Gambling) as UIBattle_Gambling;
            if (uibattle_Gambling != null)
            {
                uibattle_Gambling.CloseUI();
            }
        }
        return(true);
    }
Exemple #3
0
    // Token: 0x060008E8 RID: 2280 RVA: 0x000B65D4 File Offset: 0x000B47D4
    public void CloseMenu(bool bClear = false)
    {
        GUIManager guimanager = GUIManager.Instance;

        if (guimanager.m_WindowStack.Count == 0)
        {
            return;
        }
        EGUIWindow eWindow = guimanager.m_WindowStack[guimanager.m_WindowStack.Count - 1].m_eWindow;

        if (bClear)
        {
            for (int i = guimanager.m_WindowStack.Count - 1; i > -1; i--)
            {
                guimanager.CloseMenu(guimanager.m_WindowStack[i].m_eWindow);
            }
            guimanager.m_WindowStack.Clear();
            guimanager.bClearWindowStack = bClear;
        }
        else
        {
            guimanager.CloseMenu(eWindow);
            guimanager.m_WindowStack.RemoveAt(guimanager.m_WindowStack.Count - 1);
        }
        if (guimanager.m_WindowStack.Count == 0)
        {
            UIBattle_Gambling uibattle_Gambling = guimanager.FindMenu(EGUIWindow.UI_Battle_Gambling) as UIBattle_Gambling;
            if (uibattle_Gambling != null)
            {
                uibattle_Gambling.DimPanle.gameObject.SetActive(false);
            }
            if (guimanager.m_ChatBox != null)
            {
                guimanager.m_ChatBox.gameObject.SetActive(true);
            }
            guimanager.UpdateUI(EGUIWindow.UI_Battle_Gambling, 10, 0);
        }
        else
        {
            if (guimanager.m_Window2 == null || eWindow != EGUIWindow.UI_Chat)
            {
                guimanager.OpenMenu(guimanager.m_WindowStack[guimanager.m_WindowStack.Count - 1].m_eWindow, guimanager.m_WindowStack[guimanager.m_WindowStack.Count - 1].m_Arg1, guimanager.m_WindowStack[guimanager.m_WindowStack.Count - 1].m_Arg2, guimanager.m_WindowStack[guimanager.m_WindowStack.Count - 1].bCameraMode, false, false);
            }
            else
            {
                guimanager.m_Window2.ReOnOpen();
            }
            if (guimanager.m_WindowStack[guimanager.m_WindowStack.Count - 1].m_eWindow != EGUIWindow.UI_Chat && guimanager.m_WindowStack[guimanager.m_WindowStack.Count - 1].m_eWindow != EGUIWindow.UI_OpenBox)
            {
                UIBattle_Gambling uibattle_Gambling2 = guimanager.FindMenu(EGUIWindow.UI_Battle_Gambling) as UIBattle_Gambling;
                if (uibattle_Gambling2 != null)
                {
                    uibattle_Gambling2.DimPanle.gameObject.SetActive(true);
                }
            }
            else
            {
                UIBattle_Gambling uibattle_Gambling3 = guimanager.FindMenu(EGUIWindow.UI_Battle_Gambling) as UIBattle_Gambling;
                if (uibattle_Gambling3 != null)
                {
                    uibattle_Gambling3.DimPanle.gameObject.SetActive(false);
                }
            }
            guimanager.UpdateUI(EGUIWindow.UI_Battle_Gambling, 11, 0);
        }
    }