private void LateUpdate()
    {
        if (!(null != m_guimaster) || !m_guiParent.activeSelf)
        {
            return;
        }
        string clickedButtonName = m_guimaster.GetClickedButtonName();

        if (!(string.Empty != clickedButtonName))
        {
            return;
        }
        if ("btn_writereview" == clickedButtonName)
        {
            string text = "http://store.steampowered.com/recommended/recommendgame/348670";
            if (Global.isSteamActive)
            {
                SteamFriends.ActivateGameOverlayToWebPage(text);
            }
            else
            {
                Debug.Log("DEBUG: " + text);
            }
        }
        else
        {
            if ("btn_open_inv" == clickedButtonName)
            {
                m_inventory.OpenSteamInventory();
            }
            ShowGui(false);
        }
    }
    private void LateUpdate()
    {
        if (!(null != m_guimaster) || !m_guiParent.activeSelf)
        {
            return;
        }
        string clickedButtonName = m_guimaster.GetClickedButtonName();

        if (!(string.Empty != clickedButtonName))
        {
            return;
        }
        if ("btn_quit_yes" == clickedButtonName)
        {
            if (!IsBattleLogging())
            {
                TheOneAndOnly theOneAndOnly = (TheOneAndOnly)Object.FindObjectOfType(typeof(TheOneAndOnly));
                Object.DestroyImmediate(theOneAndOnly.gameObject);
                Application.LoadLevel(0);
            }
        }
        else if ("btn_quit_no" == clickedButtonName)
        {
            ShowGui(false);
        }
    }
Beispiel #3
0
 private void LateUpdate()
 {
     if (null != m_guimaster)
     {
         string clickedButtonName = m_guimaster.GetClickedButtonName();
         if (string.Empty != clickedButtonName && m_btnClose.name == clickedButtonName)
         {
             m_gui.SetActive(false);
         }
     }
 }
Beispiel #4
0
 private void LateUpdate()
 {
     if (!(Time.timeSinceLevelLoad < 1f) && null != m_guimaster)
     {
         string clickedButtonName = m_guimaster.GetClickedButtonName();
         if (string.Empty != clickedButtonName && null != m_button && m_button.name == clickedButtonName)
         {
             m_button.SetActive(false);
         }
     }
 }
    private void LateUpdate()
    {
        if (Time.timeSinceLevelLoad < 1f || !(null != m_guimaster))
        {
            return;
        }
        string clickedButtonName = m_guimaster.GetClickedButtonName();

        if (!(string.Empty != clickedButtonName))
        {
            return;
        }
        if (IsActive())
        {
            if (clickedButtonName.Length == 1)
            {
                try
                {
                    ActivateGui((eActiveApp)int.Parse(clickedButtonName));
                }
                catch (Exception message)
                {
                    Debug.Log(message);
                }
            }
            else if (clickedButtonName.StartsWith("HELP_"))
            {
                m_helpText.text = LNG.Get(clickedButtonName + "_TEXT");
            }
            else if (null != m_guiCloseBtn && m_guiCloseBtn.name == clickedButtonName)
            {
                SetVisible(false);
            }
            else if (null != m_guiQuitBtn && m_guiQuitBtn.name == clickedButtonName)
            {
                QuitGameGUI quitGameGUI = (QuitGameGUI)UnityEngine.Object.FindObjectOfType(typeof(QuitGameGUI));
                if (null != quitGameGUI)
                {
                    quitGameGUI.ShowGui(true);
                }
            }
        }
        else if (null != m_guiComBtn && m_guiComBtn.name == clickedButtonName)
        {
            SetVisible(true);
        }
    }
Beispiel #6
0
    private void LateUpdate()
    {
        if (!(null != m_guimaster) || !m_guiParent.activeSelf)
        {
            return;
        }
        string clickedButtonName = m_guimaster.GetClickedButtonName();

        if (string.Empty != clickedButtonName)
        {
            if ("btn_quit_yes" == clickedButtonName)
            {
                m_saidYesFlag = true;
                ShowGui(false, string.Empty);
            }
            else if ("btn_quit_no" == clickedButtonName)
            {
                ShowGui(false, string.Empty);
            }
        }
    }
    private void LateUpdate()
    {
        if (!(null != m_guimaster))
        {
            return;
        }
        string clickedButtonName = m_guimaster.GetClickedButtonName();

        if (!(string.Empty != clickedButtonName))
        {
            return;
        }
        if (null != m_btnOpen && m_btnOpen.name == clickedButtonName)
        {
            m_guiBig.SetActive(true);
        }
        else if ((null != m_btnClose && m_btnClose.name == clickedButtonName) || (null != m_btnCraft && m_btnCraft.name == clickedButtonName))
        {
            if (null != m_btnCraft && m_btnCraft.name == clickedButtonName)
            {
                m_communicator.OpenCrafting();
                m_guiBig.SetActive(false);
                m_guiSteamInventory.SetActive(false);
            }
            else if (m_guiSteamInventory.activeSelf)
            {
                m_guiSteamInventory.SetActive(false);
            }
            else
            {
                m_guiBig.SetActive(false);
            }
        }
        else if (null != m_btnSteamInventory && m_btnSteamInventory.name == clickedButtonName)
        {
            m_guiSteamInventory.SetActive(!m_guiSteamInventory.activeSelf);
        }
    }
Beispiel #8
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]);
            }
        }
    }
Beispiel #9
0
 private void LateUpdate()
 {
     if (null != m_guimaster)
     {
         string clickedButtonName = m_guimaster.GetClickedButtonName();
         if (string.Empty != clickedButtonName)
         {
             if (m_btnSplitName == clickedButtonName)
             {
                 m_input.SplitItem(m_item);
                 Hide();
             }
             else if (m_btnEatName == clickedButtonName)
             {
                 m_input.ConsumeItem(m_item);
                 Hide();
             }
         }
     }
     if (Input.anyKeyDown && Time.time > m_lastShowTime + 0.5f)
     {
         Hide();
     }
 }
Beispiel #10
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);
        }
    }
Beispiel #12
0
    private void LateUpdate()
    {
        if (!(null != m_guimaster))
        {
            return;
        }
        string clickedButtonName = m_guimaster.GetClickedButtonName();

        if (!(string.Empty != clickedButtonName))
        {
            return;
        }
        if (null != m_btnCraft && m_btnCraft.name == clickedButtonName)
        {
            int num  = m_craftableItemTypes[m_activePage][m_selectedItem];
            int num2 = Items.IsStackable(num) ? 1 : m_amount;
            if (UpdateNeedHave())
            {
                if (m_inventory.GetFreeSlots() >= num2)
                {
                    m_client.SendCraftRequest(num, m_amount);
                    base.audio.clip = m_buildClip;
                    base.audio.Play();
                }
                else
                {
                    Debug.Log("too less space in inventory " + m_inventory.GetFreeSlots() + " < " + num2);
                    base.audio.clip = m_failClip;
                    base.audio.Play();
                }
            }
            else
            {
                base.audio.clip = m_failClip;
                base.audio.Play();
            }
            return;
        }
        if (null != m_btnMore && m_btnMore.name == clickedButtonName)
        {
            SetCraftAmount(m_amount + 1);
            return;
        }
        if (null != m_btnLess && m_btnLess.name == clickedButtonName)
        {
            SetCraftAmount(m_amount - 1);
            return;
        }
        if (null != m_btnItems && m_btnItems.name == clickedButtonName)
        {
            Vector3 mousePosition = Input.mousePosition;
            float   num3          = (mousePosition.y / (float)Screen.height - m_minClickHeight) / (m_maxClickHeight - m_minClickHeight);
            int     a_index       = (int)((1f - num3) * 8f);
            ChooseItem(a_index);
            return;
        }
        for (int i = 0; i < m_btnPages.Length; i++)
        {
            if (null != m_btnPages[i] && m_btnPages[i].name == clickedButtonName)
            {
                ActivatePage(i);
            }
        }
    }