459 {
460 SlotsIcon icon;
461 int i;
463
467
473
474 for ( i = 0; i < number_of_rows; i++ )
475 {
478
480 {
482 }
483 else
484 {
486 }
487
489 {
491 WidgetEventHandler.GetInstance().RegisterOnDropReceived( icon.GetMainWidget(),
m_Parent,
"OnDropReceivedFromHeader2" );
492 WidgetEventHandler.GetInstance().RegisterOnDropReceived( icon.
GetGhostSlot(),
m_Parent,
"OnDropReceivedFromHeader2" );
493 WidgetEventHandler.GetInstance().RegisterOnDropReceived( icon.
GetPanelWidget(),
m_Parent,
"OnDropReceivedFromHeader2" );
494
495 WidgetEventHandler.GetInstance().RegisterOnDraggingOver( icon.GetMainWidget(),
m_Parent,
"DraggingOverHeader" );
496 WidgetEventHandler.GetInstance().RegisterOnDraggingOver( icon.
GetGhostSlot(),
m_Parent,
"DraggingOverHeader" );
497 WidgetEventHandler.GetInstance().RegisterOnDraggingOver( icon.
GetPanelWidget(),
m_Parent,
"DraggingOverHeader" );
498
499 WidgetEventHandler.GetInstance().RegisterOnMouseButtonDown( icon.GetMainWidget(),
m_Parent,
"MouseClick2" );
500 WidgetEventHandler.GetInstance().RegisterOnMouseButtonDown( icon.
GetGhostSlot(),
m_Parent,
"MouseClick2" );
501 WidgetEventHandler.GetInstance().RegisterOnMouseButtonDown( icon.
GetPanelWidget(),
m_Parent,
"MouseClick2" );
502 }
503 }
504
506 {
509
511
512
514 {
515 if ( !
m_Entity.IsInherited( Pistol_Base ) )
516 path =
"CfgSlots" +
" Slot_" +
"magazine2";
517 }
518
519 string icon_name = "";
520 if(
GetGame().ConfigGetText(
path +
" ghostIcon", icon_name ) && icon_name !=
"" )
521 icon.
GetGhostSlot().LoadImageFile( 0, StaticGUIUtils.VerifyIconImageString(StaticGUIUtils.IMAGESETGROUP_INVENTORY,icon_name) );
525
528
530 if( item )
532 else
534
535 if (
m_Entity.CanDisplayAttachmentSlot(slot_id))
536 {
537 icon.GetMainWidget().Show( true );
538 }
539 else
540 {
541 icon.GetMainWidget().Show( false );
542 }
543 }
544
546 {
547 int row_index = number_of_rows - 1;
549 if( row_last )
550 {
552 {
553 row_last.
GetSlotIcon( k ).GetMainWidget().Show(
false );
554 }
555 row_last.GetRootWidget().Update();
556 row_last.GetRootWidget().GetParent().Update();
557 }
558 }
559
561 }
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)
void SetSlotDisplayName(string text)
ImageWidget GetGhostSlot()
proto native CGame GetGame()