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

◆ DoubleClick()

void AttachmentCategoriesRow::DoubleClick ( Widget w,
int x,
int y,
int button )
inlineprotected

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

764 {
765 if (button == MouseState.LEFT && !g_Game.IsLeftCtrlDown())
766 {
767 ItemPreviewWidget iw = ItemPreviewWidget.Cast(w.FindAnyWidget("Render"));
768 if (!iw)
769 {
770 string name = w.GetName();
771 name.Replace("PanelWidget", "Render");
772 iw = ItemPreviewWidget.Cast(w.FindAnyWidget(name));
773 }
774
775 if (!iw)
776 iw = ItemPreviewWidget.Cast(w);
777
778 SlotsIcon icon;
779 w.GetUserData(icon);
780
781 if (icon && m_Entity.GetInventory().GetSlotLock(iw.GetUserID()))
782 return;
783
784 if (icon.IsOutOfReach())
785 return;
786
787 ItemBase item = ItemBase.Cast(iw.GetItem());
788 if (item)
789 {
790 if (!item.GetInventory().CanRemoveEntity())
791 return;
792
793 PlayerBase controlledPlayer = PlayerBase.Cast(GetGame().GetPlayer());
794 if (controlledPlayer.GetInventory().HasEntityInInventory(item) && controlledPlayer.GetHumanInventory().CanAddEntityInHands(item))
795 {
796 controlledPlayer.PredictiveTakeEntityToHands(item);
797 }
798 else
799 {
800 if (controlledPlayer.GetInventory().CanAddEntityToInventory(item) && item.GetInventory().CanRemoveEntity())
801 {
802 if (item.GetTargetQuantityMax() < item.GetQuantity())
803 item.SplitIntoStackMaxClient(controlledPlayer, -1);
804 else
805 controlledPlayer.PredictiveTakeEntityToInventory(FindInventoryLocationType.ANY, item);
806 }
807 else
808 {
809 if (controlledPlayer.GetHumanInventory().CanAddEntityInHands(item))
810 {
811 if (item.GetTargetQuantityMax() < item.GetQuantity())
812 item.SplitIntoStackMaxHandsClient(controlledPlayer);
813 else
814 controlledPlayer.PredictiveTakeEntityToHands(item);
815 }
816 }
817 }
818
819 HideOwnedTooltip();
820
821 name = w.GetName();
822 name.Replace("PanelWidget", "Temperature");
823 w.FindAnyWidget(name).Show(false);
824 }
825 }
826 }
EntityAI m_Entity
Определения ActionDebug.c:11
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DayZGame g_Game
Определения DayZGame.c:3868
class GP5GasMask extends MaskBase ItemBase
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:17
PlayerBase GetPlayer()
Определения ModifierBase.c:51
proto native EntityAI GetItem()
bool IsOutOfReach()
Определения SlotsIcon.c:729
proto native CGame GetGame()
MouseState
Определения EnSystem.c:311

Перекрестные ссылки g_Game, GetGame(), ItemPreviewWidget::GetItem(), GetPlayer(), SlotsIcon::IsOutOfReach(), m_Entity, name, x и y.