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

◆ ShowAtt()

void HandsContainer::ShowAtt ( EntityAI entity)
inlineprotected

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

1220 {
1223 m_Entity = entity;
1224 m_ActiveIndex = 0;
1225 if( entity.GetSlotsCountCorrect() > 0 )
1226 {
1227 m_Atts = new Attachments( this, entity );
1228 m_Atts.InitAttachmentGrid( 1 );
1229 m_AttachmentSlotsSorted = m_Atts.GetSlotsSorted();
1230 m_StaticAttCount = m_Atts.GetAttachmentHeight();
1231 m_Entity.GetOnItemAttached().Insert( AttachmentAdded );
1232 m_Entity.GetOnItemDetached().Insert( AttachmentRemoved );
1233 }
1234 else
1235 {
1236 m_StaticAttCount = 0;
1237 }
1238
1239 if( entity.GetInventory().GetCargo() )
1240 {
1241 m_CargoGrid = new CargoContainer( this, false );
1242 m_CargoGrid.SetEntity( entity );
1243 m_CargoGrid.GetRootWidget().SetSort( 1 );
1246 }
1247
1249 {
1250 foreach( int slot_id : m_AttachmentSlotsSorted )
1251 {
1252 EntityAI item = m_Entity.GetInventory().FindAttachment( slot_id );
1253 if( item )
1254 AttachmentAdded( item, InventorySlots.GetSlotName( slot_id ), m_Entity );
1255 }
1256 }
1257
1258 if (m_CargoGrid)
1259 {
1260 bool hideCargo = m_Entity.GetInventory().IsInventoryLockedForLockType( HIDE_INV_FROM_SCRIPT ) || !m_Entity.CanDisplayCargo() || m_ForcedHide;
1261 if (m_CargoGrid.IsVisible() && hideCargo)
1262 {
1263 HideCargo();
1264 }
1265 else if (!m_CargoGrid.IsVisible() && !hideCargo)
1266 {
1267 ShowCargo();
1268 }
1269 }
1270
1271 m_CollapsibleHeader.ShowCollapseButtons(false);
1272 //m_CollapsibleHeader.ShowCollapseButtons( m_Atts || m_CargoGrid, m_Atts || m_CargoGrid );
1273 RecomputeOpenedContainers();
1274 Refresh();
1275 m_Parent.Refresh();
1276 }
class LogManager EntityAI
EntityAI m_Entity
Определения ActionDebug.c:11
Widget m_Parent
Определения SizeToChild.c:92
void CargoContainer(LayoutHolder parent, bool is_attachment=false)
Определения CargoContainer.c:32
void ResetContainer()
Определения HandsContainer.c:56
void HideCargo()
Определения HandsContainer.c:1581
void AttachmentRemoved(EntityAI item, string slot, EntityAI parent)
Определения HandsContainer.c:1343
ref HandsHeader m_CollapsibleHeader
Определения HandsContainer.c:4
void AttachmentAdded(EntityAI item, string slot, EntityAI parent)
Определения HandsContainer.c:1288
ref Attachments m_Atts
Определения HandsContainer.c:7
override void Refresh()
Определения HandsContainer.c:324
ref CargoContainer m_CargoGrid
Определения HandsContainer.c:8
override void Insert(LayoutHolder container, int pos=-1, bool immedUpdate=true)
Определения HandsContainer.c:182
void ShowCargo()
Определения HandsContainer.c:1590
int m_StaticAttCount
Определения HandsContainer.c:15
int m_StaticCargoCount
Определения HandsContainer.c:16
ref array< int > m_AttachmentSlotsSorted
Определения HandsContainer.c:13

Перекрестные ссылки AttachmentAdded(), AttachmentRemoved(), Container::CargoContainer(), InventorySlots::GetSlotName(), HideCargo(), Insert(), m_AttachmentSlotsSorted, m_Atts, m_CargoGrid, m_CollapsibleHeader, m_Entity, m_Parent, m_StaticAttCount, m_StaticCargoCount, Refresh(), ResetContainer() и ShowCargo().