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

◆ DraggingOverHandsPanel()

void HandsArea::DraggingOverHandsPanel ( Widget w,
int x,
int y,
Widget receiver )
inlineprotected

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

118 {
119 if ( w == NULL )
120 {
121 return;
122 }
123
124 ItemPreviewWidget ipw = ItemPreviewWidget.Cast( w.FindAnyWidget( "Render" ) );
125
126 if( !ipw )
127 {
128 string name = w.GetName();
129 name.Replace( "PanelWidget", "Render" );
130 ipw = ItemPreviewWidget.Cast( w.FindAnyWidget( name ) );
131 }
132
133 if( !ipw )
134 {
135 ipw = ItemPreviewWidget.Cast( w );
136 }
137
138 if( !ipw || !ipw.IsInherited( ItemPreviewWidget ) )
139 {
140 return;
141 }
142
143 if( ipw.GetItem() && g_Game.GetPlayer().GetHumanInventory().CanAddEntityIntoHands( ipw.GetItem() ) )
144 {
145 ColorManager.GetInstance().SetColor( w, ColorManager.GREEN_COLOR );
146 ItemManager.GetInstance().HideDropzones();
147 ItemManager.GetInstance().GetCenterDropzone().SetAlpha( 1 );
148 }
149 else
150 {
151 ColorManager.GetInstance().SetColor( w, ColorManager.RED_COLOR );
152 ItemManager.GetInstance().HideDropzones();
153 ItemManager.GetInstance().GetCenterDropzone().SetAlpha( 1 );
154 }
155 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DayZGame g_Game
Определения DayZGame.c:3942
proto native HumanInventory GetHumanInventory()
bool CanAddEntityIntoHands(notnull EntityAI item)
Test if entity can be put into hands.
proto native EntityAI GetItem()

Перекрестные ссылки g_Game, ItemManager::GetCenterDropzone(), ColorManager::GetInstance(), ItemManager::GetInstance(), ItemPreviewWidget::GetItem(), ColorManager::GREEN_COLOR, ItemManager::HideDropzones(), name, ColorManager::RED_COLOR, ColorManager::SetColor(), x и y.