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

◆ DraggingOverGrid()

bool AttachmentCategoriesRow::DraggingOverGrid ( Widget w,
int x,
int y,
Widget reciever,
CargoContainer cargo )
inlineprotected

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

493 {
494 if (w == null)
495 {
496 return false;
497 }
498
500
501 if (!item)
502 {
503 return false;
504 }
505
506 int color;
507 int idx = 0;
508 int c_x, c_y;
509
510 EntityAI target_entity;
511 CargoBase target_cargo;
512
513 target_entity = cargo.GetEntity() ;
514 if (target_entity)
515 {
516 target_cargo = target_entity.GetInventory().GetCargo();
517 }
518 else
519 return false;
520
521 if (target_cargo && target_entity)
522 {
523 c_x = target_cargo.GetHeight();
524 c_y = target_cargo.GetWidth();
525 }
526 else
527 return false;
528
529 if (c_x > x && c_y > y && target_entity.GetInventory().CanAddEntityInCargoEx(item, idx, x, y, item.GetInventory().GetFlipCargo()))
530 {
531 color = ColorManager.GREEN_COLOR;
532 }
533 else
534 {
535 color = ColorManager.RED_COLOR;
536 }
537
538 if (w.FindAnyWidget("Cursor"))
539 {
540 w.FindAnyWidget("Cursor").SetColor(color);
541 }
542 else
543 {
544 string name = w.GetName();
545 name.Replace("PanelWidget", "Cursor");
546 if (w.FindAnyWidget(name))
547 {
548 w.FindAnyWidget(name).SetColor(color);
549 }
550 }
551
552 return true;
553 }
class LogManager EntityAI
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
Icon x
Icon y
EntityAI GetItemPreviewItem(Widget w)
Определения AttachmentCategoriesRow.c:606
proto native int GetWidth()
proto native int GetHeight()

Перекрестные ссылки CargoBase::GetHeight(), GetItemPreviewItem(), CargoBase::GetWidth(), ColorManager::GREEN_COLOR, name, ColorManager::RED_COLOR, x и y.