460 {
461 SlotsIcon icon;
462 int i;
464
468
474
475 for ( i = 0; i < number_of_rows; i++ )
476 {
479
481 {
483 }
484 else
485 {
487 }
488
490 {
492 WidgetEventHandler.GetInstance().RegisterOnDropReceived( icon.GetMainWidget(),
m_Parent,
"OnDropReceivedFromHeader2" );
493 WidgetEventHandler.GetInstance().RegisterOnDropReceived( icon.
GetGhostSlot(),
m_Parent,
"OnDropReceivedFromHeader2" );
494 WidgetEventHandler.GetInstance().RegisterOnDropReceived( icon.
GetPanelWidget(),
m_Parent,
"OnDropReceivedFromHeader2" );
495
496 WidgetEventHandler.GetInstance().RegisterOnDraggingOver( icon.GetMainWidget(),
m_Parent,
"DraggingOverHeader" );
497 WidgetEventHandler.GetInstance().RegisterOnDraggingOver( icon.
GetGhostSlot(),
m_Parent,
"DraggingOverHeader" );
498 WidgetEventHandler.GetInstance().RegisterOnDraggingOver( icon.
GetPanelWidget(),
m_Parent,
"DraggingOverHeader" );
499
500 WidgetEventHandler.GetInstance().RegisterOnMouseButtonDown( icon.GetMainWidget(),
m_Parent,
"MouseClick2" );
501 WidgetEventHandler.GetInstance().RegisterOnMouseButtonDown( icon.
GetGhostSlot(),
m_Parent,
"MouseClick2" );
502 WidgetEventHandler.GetInstance().RegisterOnMouseButtonDown( icon.
GetPanelWidget(),
m_Parent,
"MouseClick2" );
503 }
504 }
505
507 {
510
512
513
515 {
516 if ( !
m_Entity.IsInherited( Pistol_Base ) )
517 path =
"CfgSlots" +
" Slot_" +
"magazine2";
518 }
519
520 string icon_name = "";
521 if(
g_Game.ConfigGetText(
path +
" ghostIcon", icon_name ) && icon_name !=
"" )
522 icon.
GetGhostSlot().LoadImageFile( 0, StaticGUIUtils.VerifyIconImageString(StaticGUIUtils.IMAGESETGROUP_INVENTORY,icon_name) );
526
529
531 if( item )
533 else
535
536 if (
m_Entity.CanDisplayAttachmentSlot(slot_id))
537 {
538 icon.GetMainWidget().Show( true );
539 }
540 else
541 {
542 icon.GetMainWidget().Show( false );
543 }
544 }
545
547 {
548 int row_index = number_of_rows - 1;
550 if( row_last )
551 {
553 {
554 row_last.
GetSlotIcon( k ).GetMainWidget().Show(
false );
555 }
556 row_last.GetRootWidget().Update();
557 row_last.GetRootWidget().GetParent().Update();
558 }
559 }
560
562 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
ref array< string > m_AttachmentSlotNames
ref AttachmentsWrapper m_AttachmentsContainer
void AttachmentAdded(EntityAI item, string slot, EntityAI parent)
ref array< int > m_AttachmentIDOrdered
ref map< int, SlotsIcon > m_AttachmentSlots
SlotsIcon GetSlotIcon(int index)
void SetSlotID(int slot_ID)
ImageWidget GetGhostSlot()
void SetSlotDisplayName(string text)