890 {
893
895
896 array<string> player_ghosts_slots2 = new array<string>();
897 string categoryName;
898
899 m_RowConfigPath = config_path_attachment_categories +
" " + attachment_category +
" attachmentSlots";
900 string config_path_category_name = config_path_attachment_categories + " " + attachment_category + " name";
904
906 SetHeader(null);
907
908 int count = player_ghosts_slots2.Count();
910 SlotsContainer slotsContainer;
911
912 for ( int j = 0; j < count; j++ )
913 {
914 string slotName = player_ghosts_slots2.Get(j);
915 string iconName;
917
918 int slotId = InventorySlots.GetSlotIdFromString(
slotName);
919
922
925 if (column == 0)
926 {
928 slotsContainer.GetRootWidget().SetAlpha(0.7);
929 if (row == lastRow)
931 else
933
935 slotsContainer.GetRootWidget().SetSort(row);
936 }
937
938 SlotsIcon icon = slotsContainer.
GetSlotIcon(column);
939 WidgetEventHandler.GetInstance().RegisterOnDropReceived(icon.GetMainWidget(), this, "OnDropReceivedFromHeader");
940 WidgetEventHandler.GetInstance().RegisterOnDropReceived(icon.
GetGhostSlot(),
this,
"OnDropReceivedFromHeader");
941 WidgetEventHandler.GetInstance().RegisterOnDropReceived(icon.
GetPanelWidget(),
this,
"OnDropReceivedFromHeader");
942
943 WidgetEventHandler.GetInstance().RegisterOnDraggingOver(icon.GetMainWidget(), this, "DraggingOverHeader");
944 WidgetEventHandler.GetInstance().RegisterOnDraggingOver(icon.
GetGhostSlot(),
this,
"DraggingOverHeader");
945 WidgetEventHandler.GetInstance().RegisterOnDraggingOver(icon.
GetPanelWidget(),
this,
"DraggingOverHeader");
946
947 WidgetEventHandler.GetInstance().RegisterOnDrop(icon.GetMainWidget(), this, "OnIconDrop");
948 WidgetEventHandler.GetInstance().RegisterOnDrop(icon.
GetPanelWidget(),
this,
"OnIconDrop");
949
950 WidgetEventHandler.GetInstance().RegisterOnDoubleClick(icon.
GetPanelWidget(),
this,
"DoubleClick");
951 WidgetEventHandler.GetInstance().RegisterOnMouseButtonUp(icon.
GetPanelWidget(),
this,
"MouseClick");
952
953 icon.
GetGhostSlot().LoadImageFile(0, StaticGUIUtils.VerifyIconImageString(StaticGUIUtils.IMAGESETGROUP_INVENTORY, iconName));
956
958 }
960 }
PlayerSpawnPreset slotName
ref AttachmentsGroupContainer m_AttachmentsContainer
string m_CategoryIdentifier
proto native void ConfigGetTextArray(string path, out TStringArray values)
Get array of strings from config on path.
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
SlotsIcon GetSlotIcon(int index)
void SetSlotID(int slot_ID)
void SetSlotDisplayName(string text)
ImageWidget GetGhostSlot()
proto native CGame GetGame()