DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ DraggingOverCombine()

void Icon::DraggingOverCombine ( Widget w,
int x,
int y,
Widget receiver )
inlineprotected

См. определение в файле Icon.c строка 315

316 {
317 if (w == null)
318 {
319 return;
320 }
321
322 ItemPreviewWidget selectedIpw = ItemPreviewWidget.Cast(w.FindAnyWidget("Render"));
323 if (!selectedIpw)
324 {
325 string name = w.GetName();
326 name.Replace("PanelWidget", "Render");
327 selectedIpw = ItemPreviewWidget.Cast(w.FindAnyWidget(name));
328 }
329
330 if (!selectedIpw)
331 {
332 selectedIpw = ItemPreviewWidget.Cast(w);
333 }
334
335 if (!selectedIpw.GetItem())
336 {
337 return;
338 }
339 EntityAI selectedEntity = selectedIpw.GetItem();
340 EntityAI targetEntity = GetGame().GetPlayer().GetHumanInventory().GetEntityInHands();
341
342 static int testedFlags = InventoryCombinationFlags.SET_ACTION | InventoryCombinationFlags.PERFORM_ACTION | InventoryCombinationFlags.COMBINE_QUANTITY2 | InventoryCombinationFlags.ADD_AS_CARGO | InventoryCombinationFlags.ADD_AS_ATTACHMENT;
343
344 int chosenInventoryAction = ItemManager.GetChosenCombinationFlag(selectedEntity, targetEntity, testedFlags);
345 UpdateFrameColor(selectedEntity, targetEntity, chosenInventoryAction, w);
346 }
class LogManager EntityAI
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
proto native DayZPlayer GetPlayer()
void UpdateFrameColor(EntityAI selectedEntity, EntityAI targetEntity, int combinationFlag, Widget w, InventoryLocation il=null)
Определения Icon.c:568
proto native EntityAI GetItem()
proto native CGame GetGame()

Перекрестные ссылки InventoryCombinationFlags::ADD_AS_ATTACHMENT, InventoryCombinationFlags::ADD_AS_CARGO, InventoryCombinationFlags::COMBINE_QUANTITY2, ItemManager::GetChosenCombinationFlag(), GetGame(), ItemPreviewWidget::GetItem(), CGame::GetPlayer(), name, InventoryCombinationFlags::PERFORM_ACTION, InventoryCombinationFlags::SET_ACTION, UpdateFrameColor(), x и y.