Esempio n. 1
0
        private void OnUpdate()
        {
            if ((double)this._canvasGroup.get_alpha() == 0.0 || this._itemSendPanel.isOpen || ((IEnumerable <ItemBoxUI.ItemBoxDataPack>) this.itemPacks).Any <ItemBoxUI.ItemBoxDataPack>((Func <ItemBoxUI.ItemBoxDataPack, bool>)(item => item.itemSortUI.isOpen)))
            {
                return;
            }
            bool flag = false;

            if (Singleton <Input> .Instance.IsPressedAxis(ActionID.LeftShoulder2))
            {
                this._focusElement.set_Value(ItemBoxUI.SelectedElement.Inventory);
                flag = true;
            }
            else if (Singleton <Input> .Instance.IsPressedAxis(ActionID.RightShoulder2))
            {
                this._focusElement.set_Value(ItemBoxUI.SelectedElement.ItemBox);
                flag = true;
            }
            if (!flag)
            {
                return;
            }
            this.ViewerCursorOFF();
            ItemFilterCategoryUI categoryUi = this.currentPack.categoryUI;

            this.SetFocusLevel(categoryUi.FocusLevel);
            categoryUi.SelectedID = categoryUi.CategoryID;
            categoryUi.useCursor  = true;
        }
Esempio n. 2
0
 private void SetCursorFocus(
     Image cursor,
     ItemFilterCategoryUI categoryUI,
     Selectable selectable)
 {
     categoryUI.useCursor = false;
     CursorFrame.Set(((Graphic)cursor).get_rectTransform(), (RectTransform)((Component)selectable).GetComponent <RectTransform>(), (RectTransform)null);
     foreach (ItemBoxUI.ItemBoxDataPack itemBoxDataPack in ((IEnumerable <ItemBoxUI.ItemBoxDataPack>) this.itemPacks).Where <ItemBoxUI.ItemBoxDataPack>((Func <ItemBoxUI.ItemBoxDataPack, bool>)(p => Object.op_Inequality((Object)p.cursor, (Object)cursor))))
     {
         ((Behaviour)itemBoxDataPack.cursor).set_enabled(false);
     }
     ((Behaviour)cursor).set_enabled(true);
     this.SetFocusLevel(categoryUI.FocusLevel);
 }