示例#1
0
    private void LateUpdate()
    {
        if (!(null != m_guimaster))
        {
            return;
        }
        string clickedButtonName      = m_guimaster.GetClickedButtonName();
        string rightClickedButtonName = m_guimaster.GetRightClickedButtonName();
        string text = (!(string.Empty != clickedButtonName)) ? rightClickedButtonName : clickedButtonName;

        if (!(string.Empty != text))
        {
            return;
        }
        if ("btn_invite" == text)
        {
            if (m_aid != null && m_aid.Length == 5)
            {
                m_client.ShowPartyFullPopup();
                return;
            }
            base.gameObject.SetActive(false);
            m_playerListGui.OpenAsPlayerInvitation();
            return;
        }
        for (int i = 0; i < m_btnRank.Length; i++)
        {
            if (text == m_btnRank[i].name)
            {
                m_client.SendPartyRequest(ePartyControl.prodemote, m_aid[i]);
            }
            else if (text == m_btnKick[i].name)
            {
                m_client.SendPartyRequest(ePartyControl.kick, m_aid[i]);
            }
        }
    }
示例#2
0
    private void LateUpdate()
    {
        if (!(null != m_guimaster))
        {
            return;
        }
        string clickedButtonName      = m_guimaster.GetClickedButtonName();
        string rightClickedButtonName = m_guimaster.GetRightClickedButtonName();
        string text = (!(string.Empty != clickedButtonName)) ? rightClickedButtonName : clickedButtonName;

        if (!(string.Empty != text))
        {
            return;
        }
        if (text.StartsWith("btnpe_") && null != m_client)
        {
            ulong num = 0uL;
            try
            {
                num = ulong.Parse(text.Substring("btnpe_".Length));
            }
            catch (Exception)
            {
            }
            if (0 >= num)
            {
                return;
            }
            if (m_invitePartyMode)
            {
                if (!m_invitedSteamIds.Contains(num) && m_client.GetSteamId() != num)
                {
                    m_client.SendPartyRequest(ePartyControl.invite, num);
                    m_invitedSteamIds.Add(num);
                    UpdateList();
                    m_descriptionText.text = LNG.Get("PARTY_SENT_INVITE");
                }
            }
            else if (string.Empty != clickedButtonName)
            {
                if (Global.isSteamActive)
                {
                    SteamFriends.ActivateGameOverlayToUser("steamid", new CSteamID(num));
                }
            }
            else if (m_client.GetSteamId() != num)
            {
                if (m_mutedSteamIds.Contains(num))
                {
                    m_mutedSteamIds.Remove(num);
                }
                else
                {
                    m_mutedSteamIds.Add(num);
                }
                UpdateList();
            }
        }
        else if (text.StartsWith("btn_page_"))
        {
            try
            {
                m_page = int.Parse(text.Substring("btn_page_".Length)) - 1;
                UpdateList();
            }
            catch (Exception)
            {
            }
        }
    }
    private void LateUpdate()
    {
        if (!(null != m_guimaster))
        {
            return;
        }
        string text = m_guimaster.GetClickedButtonName();

        if (string.Empty == text)
        {
            text = m_guimaster.GetRightClickedButtonName();
        }
        if (!(string.Empty != text))
        {
            return;
        }
        m_contextMenu.SetActive(false);
        if (null != m_btnEquipOpen && text == m_btnEquipOpen.name)
        {
            if (EquipOrOpenItem(m_contextMenuItemIndex))
            {
                m_contextMenuItemIndex = -1;
            }
        }
        else if (null != m_btnSell && text == m_btnSell.name)
        {
            if (SellItem(m_contextMenuItemIndex))
            {
                m_contextMenuItemIndex = -1;
            }
        }
        else if (null != m_btnOpenCM && text == m_btnOpenCM.name)
        {
            OpenCommunityMarket();
        }
        else if (null != m_btnBuyKey && text == m_btnBuyKey.name)
        {
            BuyKey(1);
        }
        else if (null != m_btnBuyKeys && text == m_btnBuyKeys.name)
        {
            BuyKey(5);
        }
        else if (text.StartsWith("btn_page"))
        {
            int num = 0;
            while (true)
            {
                if (num < 14)
                {
                    if ("btn_page" + (num + 1) == text)
                    {
                        break;
                    }
                    num++;
                    continue;
                }
                return;
            }
            m_curPage = num;
            UpdateInventoryDisplay();
        }
        else
        {
            m_contextMenuItemIndex = GetClickedItemIndex(text);
        }
    }