915 {
918
920
921 array<string> player_ghosts_slots2 = new array<string>();
922 string categoryName;
923
924 m_RowConfigPath = config_path_attachment_categories +
" " + attachment_category +
" attachmentSlots";
925 string config_path_category_name = config_path_attachment_categories + " " + attachment_category + " name";
927 g_Game.ConfigGetText(config_path_category_name, categoryName);
929
931 SetHeader(null);
932
933 int count = player_ghosts_slots2.Count();
935 SlotsContainer slotsContainer;
936
937 for (int j = 0; j < count; ++j)
938 {
939 string slotName = player_ghosts_slots2.Get(j);
940 string iconName;
942
943 int slotId = InventorySlots.GetSlotIdFromString(
slotName);
944
945 g_Game.ConfigGetText(
path +
" ghostIcon", iconName);
947
950 if (column == 0)
951 {
953 slotsContainer.GetRootWidget().SetAlpha(0.7);
954 if (row == lastRow)
956 else
958
960 slotsContainer.GetRootWidget().SetSort(row);
961 }
962
963 SlotsIcon icon = slotsContainer.
GetSlotIcon(column);
964 WidgetEventHandler.GetInstance().RegisterOnDropReceived(icon.GetMainWidget(), this, "OnDropReceivedFromHeader");
965 WidgetEventHandler.GetInstance().RegisterOnDropReceived(icon.
GetGhostSlot(),
this,
"OnDropReceivedFromHeader");
966 WidgetEventHandler.GetInstance().RegisterOnDropReceived(icon.
GetPanelWidget(),
this,
"OnDropReceivedFromHeader");
967
968 WidgetEventHandler.GetInstance().RegisterOnDraggingOver(icon.GetMainWidget(), this, "DraggingOverHeader");
969 WidgetEventHandler.GetInstance().RegisterOnDraggingOver(icon.
GetGhostSlot(),
this,
"DraggingOverHeader");
970 WidgetEventHandler.GetInstance().RegisterOnDraggingOver(icon.
GetPanelWidget(),
this,
"DraggingOverHeader");
971
972 WidgetEventHandler.GetInstance().RegisterOnDrop(icon.GetMainWidget(), this, "OnIconDrop");
973 WidgetEventHandler.GetInstance().RegisterOnDrop(icon.
GetPanelWidget(),
this,
"OnIconDrop");
974
975 WidgetEventHandler.GetInstance().RegisterOnDoubleClick(icon.
GetPanelWidget(),
this,
"DoubleClick");
976 WidgetEventHandler.GetInstance().RegisterOnMouseButtonUp(icon.
GetPanelWidget(),
this,
"MouseClick");
977
978 icon.
GetGhostSlot().LoadImageFile(0, StaticGUIUtils.VerifyIconImageString(StaticGUIUtils.IMAGESETGROUP_INVENTORY, iconName));
981
983 }
985 }
PlayerSpawnPreset slotName
ref AttachmentsGroupContainer m_AttachmentsContainer
string m_CategoryIdentifier
SlotsIcon GetSlotIcon(int index)
void SetSlotID(int slot_ID)
ImageWidget GetGhostSlot()
void SetSlotDisplayName(string text)