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

◆ ShowActionMenuCombine()

void HandsContainer::ShowActionMenuCombine ( EntityAI entity1,
EntityAI entity2,
int combinationFlags )
inlineprotected

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

728 {
729 if ( entity1 && entity2 ) PrintString( "Showing action menu for " + entity1.GetDisplayName() + " and " + entity2.GetDisplayName() );
730
731 ContextMenu cmenu = ContextMenu.Cast(GetGame().GetUIManager().GetMenu().GetContextMenu());
732 m_am_entity1 = entity1;
733 m_am_entity2 = entity2;
734 cmenu.Hide();
735 cmenu.Clear();
736
737 if( combinationFlags & InventoryCombinationFlags.COMBINE_QUANTITY2 )
738 {
739 ItemBase entity = ItemBase.Cast( entity1 );
740 entity.CombineItemsClient( ItemBase.Cast( entity2 ) );
741 return;
742 }
743
744 if ( entity1 == null || entity2 == null ) return;
745
746 if ( combinationFlags == InventoryCombinationFlags.NONE ) return;
747
748 if ( combinationFlags & InventoryCombinationFlags.ADD_AS_ATTACHMENT )
749 {
750 cmenu.Add( "#inv_context_add_as_attachment", this, "OnPerformCombination", new Param1<int>( InventoryCombinationFlags.ADD_AS_ATTACHMENT ) );
751 }
752 if ( combinationFlags & InventoryCombinationFlags.LOAD_CHAMBER )
753 {
754 cmenu.Add( "#inv_context_load_chamber", this, "OnPerformCombination", new Param1<int>( InventoryCombinationFlags.LOAD_CHAMBER ) );
755 }
756
757 if ( combinationFlags & InventoryCombinationFlags.ADD_AS_CARGO )
758 {
759 cmenu.Add( "#inv_context_add_as_cargo", this, "OnPerformCombination", new Param1<int>( InventoryCombinationFlags.ADD_AS_CARGO ) );
760 }
761
762 if ( combinationFlags & InventoryCombinationFlags.SWAP )
763 {
764 cmenu.Add( "#inv_context_swap", this, "OnPerformCombination", new Param1<int>( InventoryCombinationFlags.SWAP ) );
765 }
766
767 if ( combinationFlags & InventoryCombinationFlags.TAKE_TO_HANDS )
768 {
769 cmenu.Add( "#inv_context_take_to_hands", this, "OnPerformCombination", new Param1<int>( InventoryCombinationFlags.TAKE_TO_HANDS ) );
770 }
771
772 if ( combinationFlags & InventoryCombinationFlags.COMBINE_QUANTITY2 )
773 {
774 cmenu.Add( "#inv_context_combine", this, "OnPerformCombination", new Param1<int>( InventoryCombinationFlags.COMBINE_QUANTITY2 ) );
775 }
776
777 int m_am_pos_x, m_am_pos_y;
778 GetMousePos( m_am_pos_x, m_am_pos_y );
779 m_am_pos_x -= 5;
780 m_am_pos_y -= 5;
781
782 cmenu.Show( m_am_pos_x, m_am_pos_y );
783 }
class GP5GasMask extends MaskBase ItemBase
override ContextMenu GetContextMenu()
Определения InventoryMenu.c:80
proto native CGame GetGame()
class array< Class T > PrintString
proto void GetMousePos(out int x, out int y)

Перекрестные ссылки InventoryCombinationFlags::ADD_AS_ATTACHMENT, InventoryCombinationFlags::ADD_AS_CARGO, InventoryCombinationFlags::COMBINE_QUANTITY2, GetContextMenu(), GetGame(), GetMousePos(), InventoryCombinationFlags::LOAD_CHAMBER, InventoryCombinationFlags::NONE, PrintString, InventoryCombinationFlags::SWAP и InventoryCombinationFlags::TAKE_TO_HANDS.