Exemple #1
0
 protected virtual void SetupIglooCustomizationButton(IglooCustomizationButton button, int index)
 {
     if (index < numberOfStaticButtons)
     {
         button.SetupCatalogButton();
     }
     else
     {
         button.SetupItemButton();
         int index2 = index - numberOfStaticButtons;
         DecorationDefinitionType key = inventoryCountPairs[index2].Key;
         button.gameObject.name = key.Name + "_button";
         button.Init(key.Icon, BreadcrumbType, GetIntegerDefinitionId(key), canDrag: true);
         inventoryProgressionStatus.TryGetValue(key.GetId(), out ProgressionUtils.ParsedProgression <DecorationDefinitionType> value);
         if (!SetLockableButtonLockedStatus(button, key, value))
         {
             int value2 = inventoryCountPairs[index2].Value;
             button.SetItemCount(value2, showItemCountsWithZeroCount, tintItemsWithZeroCount);
             if (value2 <= 0)
             {
                 button.SetCanDrag(drag: false);
             }
         }
         AccessibilitySettings component = button.GetComponent <AccessibilitySettings>();
         if (component != null)
         {
             component.CustomToken = key.Name;
         }
     }
     button.SetDragReferences(scrollRect, index, 0f);
 }
Exemple #2
0
    protected override void onObjectAdded(RectTransform item, int index)
    {
        base.onObjectAdded(item, index);
        IglooCustomizationButton component = item.GetComponent <IglooCustomizationButton>();

        component.SetDragReferences(base.scrollRect, index, totalDragHeight, dragContainerInstance);
        component.DraggedOffDragArea += onDraggedOffDragArea;
    }