Example #1
0
 void Update()
 {
     if (this.isActiveAndEnabled && InGameMainMenuUI.Instance.HoveredSlot && InGameMainMenuUI.Instance.HoveredSlot.ParentContainer != m_equipmentPanel)
     {
         if (!InCompareMode)
         {
             InCompareMode = ShouldBeInCompareMode();
             if (InCompareMode)
             {
                 DevItemInfo itemInfo     = Content.Instance.GetItem(OriginalItem.currentItemKey);
                 ItemInfo    matchingItem = LocalUserInfo.Me.ClientCharacter.Equipment.GetItem(itemInfo.Type);
                 if (matchingItem != null)
                 {
                     ComparedItem.Show(matchingItem);
                 }
             }
         }
         if (InCompareMode)
         {
             InCompareMode = ShouldBeInCompareMode();
             if (!InCompareMode)
             {
                 ComparedItem.Hide();
             }
         }
     }
 }
Example #2
0
 internal void HideItemText(ItemSlot slot)
 {
     if (shownSlot != slot)
     {
         return;
     }
     ui.Hide();
     shownSlot = null;
 }
Example #3
0
    void Update()
    {
        if (isWindowOpen)
        {
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                CloseAllWindows();
            }
        }
        else
        {
            if (Input.GetKeyDown(KeyCode.Escape) && !DialogManager.Instance.inDialog)
            {
                menuPanel.SetActive(true);
            }
        }

        if (Game.Instance.InGame)
        {
            if (Input.GetKeyDown(InputMap.Map["Chat"]))
            {
                chatPanel.ChatClicked();
            }
        }

        if (Game.Instance.InGame && !Game.Instance.InChat)
        {
            if (Input.GetKeyDown(InputMap.Map["Inventory"]))
            {
                if (!inventoryPanel.gameObject.activeInHierarchy)
                {
                    inventoryPanel.GetComponent <InventoryUI>().ShowInventory(Game.Instance.ClientCharacter.GetComponent <ActorInstance>().Info);
                }
                else
                {
                    inventoryPanel.GetComponent <InventoryUI>().Hide();
                    itemInfoPanel.Hide();
                }
            }

            if (Input.GetKeyDown(InputMap.Map["Equipment"]))
            {
                if (!equipmentPanel.gameObject.activeInHierarchy)
                {
                    equipmentPanel.Open(Game.Instance.ClientCharacter.GetComponent <ActorInstance>().Info);
                }
                else
                {
                    equipmentPanel.Hide();
                    itemInfoPanel.Hide();
                }
            }

            if (Input.GetKeyDown(InputMap.Map["Stats"]))
            {
                if (!statsPanel.gameObject.activeInHierarchy)
                {
                    statsPanel.Show(Game.Instance.ClientCharacter.GetComponent <ActorInstance>().Info);
                }
                else
                {
                    statsPanel.Hide();
                    StatsInfo.Hide();
                }
            }

            if (Input.GetKeyDown(InputMap.Map["Quests"]))
            {
                if (!questsPanel.gameObject.activeInHierarchy)
                {
                    ShowQuestsInProgress();
                }
                else
                {
                    HideQuestsInProgress();
                }
            }

            if (Input.GetKeyDown(InputMap.Map["CompletedQuests"]))
            {
                if (!completedQuestsPanel.gameObject.activeInHierarchy)
                {
                    ShowCompletedQuests();
                }
                else
                {
                    HideCompletedQuests();
                }
            }

            if (Input.GetKeyDown(InputMap.Map["Talents"]))
            {
                if (!PrimaryAbilityWindow.gameObject.activeInHierarchy)
                {
                    ShowPrimaryAbilitiesWindow();
                }
                else
                {
                    HidePrimaryAbilitiesWindow();
                }
            }
        }
    }
Example #4
0
 public void OnPointerExit()
 {
     infoPanel.Hide();
     hovering = false;
 }
Example #5
0
 /// <summary>
 /// 鼠标移出事件监听函数
 /// </summary>
 private void GridUI_OnExit()
 {
     ItemInfoUI.Hide();
     IsShow = false;
 }