示例#1
0
        private void Update()
        {
            if (!uGUI_SceneLoading.IsLoadingScreenFinished || uGUI.main == null || uGUI.main.loading.IsLoading)
            {
                return;
            }

            if (!createdLabels && Mod.config.ShowInputText)
            {
                var quickSlots = GameObject.FindObjectsOfType <uGUI_QuickSlots>();
                foreach (var quickSlotInstance in quickSlots)
                {
                    if (quickSlotInstance != null)
                    {
                        AddHotkeyLabels(quickSlotInstance);
                        if (createdLabels)
                        {
                            break;
                        }
                    }
                }
            }

            if (CanSetQuickSlots())
            {
                for (int i = Player.quickSlotButtonsCount; i < Mod.config.SlotCount; ++i)
                {
                    if (Mod.GetKeyDownForSlot(i))
                    {
                        SelectQuickSlot(i);
                    }
                }
            }
        }
        private void Update()
        {
            if (!uGUI_SceneLoading.IsLoadingScreenFinished || uGUI.main == null || uGUI.main.loading.IsLoading)
            {
                return;
            }

            if (CanSetQuickSlots())
            {
                for (int i = Player.quickSlotButtonsCount; i < Mod.config.SlotCount; ++i)
                {
                    if (Mod.GetKeyDownForSlot(i))
                    {
                        SelectQuickSlot(i);
                    }
                }
            }

            if (tryAddLabels)
            {
                AddHotkeyLabels(quickSlots);
            }
        }