public override void DrawUi() { for (int y = 0; y < SlotsHeight; y++) { for (int x = 0; x < SlotsWidth; x++) { bool isSelected = y == 0 && x == SelectedSlot; GameObject slot = SlotController.DrawItemSlotWithSpriteAndDetails( y, x, SlotPrefix, Slots[y, x], Parent.transform, this, DrawLeftPadding, DrawBottomPadding, isSelected, GameObjectSlots); if (isSelected) { InventorySlot invSlot = slot.GetComponent <InventorySlot>(); Transform selectedTransform = invSlot.transform; selectedTransform.GetComponent <Image>().sprite = PrefabRepository.Instance.SlotSelectSprite; } } } }
public void DrawGuiSlotAtPosition(int x, int y, bool isSelected) { SlotController.DrawItemSlotWithSpriteAndDetails( y, x, SlotPrefix, Slots[y, x], Parent.transform, this, DrawLeftPadding, DrawBottomPadding, isSelected, GameObjectSlots); }
public virtual void DrawUi() { for (int y = 0; y < SlotsHeight; y++) { for (int x = 0; x < SlotsWidth; x++) { SlotController.DrawItemSlotWithSpriteAndDetails( y, x, SlotPrefix, Slots[y, x], Parent.transform, this, DrawLeftPadding, DrawBottomPadding, false, GameObjectSlots); } } }