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 var 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); }
protected override void SetupIglooCustomizationButton(IglooCustomizationButton iglooCustomizationButton, int index) { if (index == 0) { iglooCustomizationButton.SetupCatalogButton(IglooCustomizationButton.CatalogFilterType.STRUCTURES); return; } base.SetupIglooCustomizationButton(iglooCustomizationButton, index); int index2 = index - numberOfStaticButtons; StructureDefinition key = inventoryCountPairs[index2].Key; iglooCustomizationButton.SetSizeIconSprite(key.SizeUnits - 1); }
private void setCatalogButtonCategory(int category) { if (catalogButton != null) { if (category < 0) { catalogButton.SetupCatalogButton(); } else { catalogButton.SetCatalogFilterCategory(category); } } }