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

◆ ShowAtt()

void HandsContainer::ShowAtt ( EntityAI entity)
inlineprotected

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

1219 {
1222 m_Entity = entity;
1223 m_ActiveIndex = 0;
1224 if( entity.GetSlotsCountCorrect() > 0 )
1225 {
1226 m_Atts = new Attachments( this, entity );
1227 m_Atts.InitAttachmentGrid( 1 );
1228 m_AttachmentSlotsSorted = m_Atts.GetSlotsSorted();
1229 m_StaticAttCount = m_Atts.GetAttachmentHeight();
1230 m_Entity.GetOnItemAttached().Insert( AttachmentAdded );
1231 m_Entity.GetOnItemDetached().Insert( AttachmentRemoved );
1232 }
1233 else
1234 {
1235 m_StaticAttCount = 0;
1236 }
1237
1238 if( entity.GetInventory().GetCargo() )
1239 {
1240 m_CargoGrid = new CargoContainer( this, false );
1241 m_CargoGrid.SetEntity( entity );
1242 m_CargoGrid.GetRootWidget().SetSort( 1 );
1245 }
1246
1248 {
1249 foreach( int slot_id : m_AttachmentSlotsSorted )
1250 {
1251 EntityAI item = m_Entity.GetInventory().FindAttachment( slot_id );
1252 if( item )
1253 AttachmentAdded( item, InventorySlots.GetSlotName( slot_id ), m_Entity );
1254 }
1255 }
1256
1257 if (m_CargoGrid)
1258 {
1259 bool hideCargo = m_Entity.GetInventory().IsInventoryLockedForLockType( HIDE_INV_FROM_SCRIPT ) || !m_Entity.CanDisplayCargo() || m_ForcedHide;
1260 if (m_CargoGrid.IsVisible() && hideCargo)
1261 {
1262 HideCargo();
1263 }
1264 else if (!m_CargoGrid.IsVisible() && !hideCargo)
1265 {
1266 ShowCargo();
1267 }
1268 }
1269
1270 m_CollapsibleHeader.ShowCollapseButtons(false);
1271 //m_CollapsibleHeader.ShowCollapseButtons( m_Atts || m_CargoGrid, m_Atts || m_CargoGrid );
1272 RecomputeOpenedContainers();
1273 Refresh();
1274 m_Parent.Refresh();
1275 }
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:1580
void AttachmentRemoved(EntityAI item, string slot, EntityAI parent)
Определения HandsContainer.c:1342
ref HandsHeader m_CollapsibleHeader
Определения HandsContainer.c:4
void AttachmentAdded(EntityAI item, string slot, EntityAI parent)
Определения HandsContainer.c:1287
ref Attachments m_Atts
Определения HandsContainer.c:7
override void Refresh()
Определения HandsContainer.c:323
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:1589
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().