246 {
247 int slot = InventorySlots.GetSlotIdFromString( slot_name );
249 if( icon )
250 {
252
254 {
256
257 if( item.GetSlotsCountCorrect() > 0 )
258 {
259 ContainerWithCargoAndAttachments iwca = new ContainerWithCargoAndAttachments( this, false );
260 iwca.SetEntity( item );
261 WidgetEventHandler.GetInstance().RegisterOnMouseButtonUp( icon.
GetPanelWidget(),
this,
"ToggleContainer" );
262
265
267 }
268 else if( item.GetInventory().GetCargo() )
269 {
270 ContainerWithCargo iwc = new ContainerWithCargo( this, false );
271 iwc.SetEntity( item );
272 iwc.UpdateInterval();
273 WidgetEventHandler.GetInstance().RegisterOnMouseButtonUp( icon.
GetPanelWidget(),
this,
"ToggleContainer" );
276
278 }
279 }
280
282 string config = "CfgVehicles " + item.GetType() + " GUIInventoryAttachmentsProps";
284 {
285 bool show_radial_icon = ( item.GetInventory().GetCargo() || item.GetSlotsCountCorrect() > 0 ) && !
GetGame().
ConfigIsExisting( config );
289 rip.Show( show_radial_icon );
291 icon_closed.Show( !conta.
IsOpened() );
292 }
293 RecomputeOpenedContainers();
294 }
295 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
proto native bool ConfigIsExisting(string path)
void ClosableContainer(LayoutHolder parent, int sort=-1)
Widget GetRadialIconClosed()
void Init(EntityAI obj, bool reservation=false)
Widget GetRadialIconPanel()
ref map< EntityAI, ref Container > m_ShowedItems
ref map< int, SlotsIcon > m_InventorySlots
proto native CGame GetGame()