3 protected const ResourceName LAYOUT_ITEM =
"{93472DECDA62C46F}UI/layouts/Common/RadialMenu/SelectionMenuEntryPreview.layout";
4 protected SCR_CharacterInventoryStorageComponent m_Storage;
5 protected int m_iQuickSlotID = -1;
18 IEntity item = GetItem();
23 UIInfo uiInfo = GetUIInfo(item);
26 name = uiInfo.GetName();
27 description = uiInfo.GetDescription();
35 entry.SetEnabled(enabled);
39 entryPreview.SetPreviewItem(item);
47 return m_iQuickSlotID;
51 void SetQuickSlotID(
int id)
57 protected IEntity GetItem()
59 if (m_iQuickSlotID < 0)
65 array<IEntity> quickSlotItems =
m_Storage.GetQuickSlotItems();
66 if (quickSlotItems && m_iQuickSlotID < quickSlotItems.Count())
67 return quickSlotItems[m_iQuickSlotID];
74 override void OnPerform()
78 IEntity item = GetItem();
84 protected UIInfo GetUIInfo(IEntity item)
93 return itemComponent.GetUIInfo();
100 m_iQuickSlotID = quickSlotID;
102 SetCustomLayout(LAYOUT_ITEM);
104 Enable(GetItem() !=
null);