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

◆ UpdateInterval()

void Attachments::UpdateInterval ( )
inlineprotected

См. определение в файле 5_Mission/DayZ/GUI/InventoryNew/Attachments.c строка 322

323 {
324 SlotsIcon icon;
325 int slot_id;
327 int i = 0;
328 for (i = m_AttachmentSlotNames.Count() - 1; i >=0; --i)
329 {
330 slot_id = InventorySlots.GetSlotIdFromString( m_AttachmentSlotNames[i] );
331 if (m_Entity.CanDisplayAttachmentSlot(slot_id))
332 {
334 }
335 else
336 {
337 icon = m_AttachmentSlots.Get( slot_id );
338 if (icon)
339 {
340 icon.GetMainWidget().Show( false );
341 if( GetFocusedSlotsIcon() == icon )
342 {
344 }
345 // radial icon (collabsable icon handling)
346 icon.UpdateInterval();
347 }
348 }
349
350 }
351
352 if ( m_AttachmentSlotDisplayable.Count() == 0 )
353 {
354 if (m_Parent)
355 {
356 m_Parent.UpdateRadialIcon();
357 //m_Parent.Close();
358 }
359 }
360
361 for (i = 0; i < m_AttachmentSlotDisplayable.Count(); ++i)
362 {
363 slot_id = InventorySlots.GetSlotIdFromString( m_AttachmentSlotDisplayable[i] );
364 icon = m_AttachmentSlots.Get( slot_id );
365 EntityAI item = icon.GetEntity();
366 icon.GetMainWidget().Show( true );
367 icon.UpdateInterval();
368 if ( item )
369 {
370 bool draggable = true;
371 if(icon.IsReserved())
372 {
373 draggable = false;
374 }
375
376 if( m_Entity.GetInventory().GetSlotLock( slot_id ) && ItemManager.GetInstance().GetDraggedItem() != item )
377 {
378 icon.GetMountedWidget().Show( true );
379 draggable = false;
380 }
381 else
382 {
383 icon.GetMountedWidget().Show( false );
384 }
385
386 PlayerBase p = PlayerBase.Cast( g_Game.GetPlayer() );
387 bool in_hands_condition = m_Entity.GetHierarchyRoot() && item.GetInventory().CanRemoveEntity();
388 bool in_vicinity_condition = !m_Entity.GetHierarchyRoot() && AttachmentsOutOfReach.IsAttachmentReachable( m_Entity, m_AttachmentSlotDisplayable[i] );
389 if( in_hands_condition || in_vicinity_condition )
390 {
391 icon.GetOutOfReachWidget().Show( false );
392 }
393 else
394 {
395 icon.GetOutOfReachWidget().Show( true );
396 draggable = false;
397 }
398
399 if( draggable )
400 {
401 icon.GetPanelWidget().SetFlags( WidgetFlags.DRAGGABLE );
402 }
403 else
404 {
405 icon.GetPanelWidget().ClearFlags( WidgetFlags.DRAGGABLE );
406 }
407 }
408 }
409 m_AttachmentsContainer.GetRootWidget().Update();
410 }
class LogManager EntityAI
DayZGame g_Game
Определения DayZGame.c:4074
ref array< string > m_AttachmentSlotDisplayable
ref array< string > m_AttachmentSlotNames
ref AttachmentsWrapper m_AttachmentsContainer
void SetDefaultFocus(bool while_micromanagment_mode=false)
SlotsIcon GetFocusedSlotsIcon()
ref map< int, SlotsIcon > m_AttachmentSlots
override void UpdateInterval()
Определения SlotsIconBase.c:706
Widget GetOutOfReachWidget()
Определения SlotsIconBase.c:235
bool IsReserved()
Определения SlotsIconBase.c:170
Widget GetPanelWidget()
Определения SlotsIconBase.c:175
EntityAI GetEntity()
Определения SlotsIconBase.c:335
Widget GetMountedWidget()
Определения SlotsIconBase.c:195
WidgetFlags
Определения EnWidgets.c:58

Перекрестные ссылки g_Game, ItemManager::GetDraggedItem(), SlotsIconBase::GetEntity(), GetFocusedSlotsIcon(), ItemManager::GetInstance(), SlotsIconBase::GetMountedWidget(), SlotsIconBase::GetOutOfReachWidget(), SlotsIconBase::GetPanelWidget(), InventorySlots::GetSlotIdFromString(), AttachmentsOutOfReach::IsAttachmentReachable(), SlotsIconBase::IsReserved(), m_AttachmentsContainer, m_AttachmentSlotDisplayable, m_AttachmentSlotNames, m_AttachmentSlots, m_Entity, m_Parent, SetDefaultFocus() и SlotsIconBase::UpdateInterval().

Используется в HandsContainer::AttachmentAdded().