109 GetMainWidget().GetScreenPos(
x,
y);
118#ifndef PLATFORM_CONSOLE
120 super.SetParentWidget();
131 super.SetParentWidget();
146 menu.RefreshQuickbar();
160 string name =
w.GetName();
161 name.Replace(
"PanelWidget",
"Render");
246 string name =
w.GetName();
247 name.Replace(
"PanelWidget",
"Render");
271 player.GetHumanInventory().GetUserReservedLocation(
index,
il);
295 string name =
w.GetName();
296 name.Replace(
"PanelWidget",
"Render");
318 PrepareOwnedTooltip(
m_Obj,
x,
y);
339 string name =
w.GetName();
340 name.Replace(
"PanelWidget",
"Render");
387 if (parent.GetInventory().LocationCanAddEntity(
ilDst))
411 if (m_am_entity1 ==
null || m_am_entity2 ==
null)
return;
423 if (m_am_entity1 ==
player.GetHumanInventory().GetEntityInHands())
433 if (m_am_entity1 ==
player.GetHumanInventory().GetEntityInHands())
445 float stackable = m_am_entity2.GetTargetQuantityMax(-1);
448 player.PredictiveTakeEntityToTargetAttachment(m_am_entity1, m_am_entity2);
453 ItemBase.Cast(m_am_entity2).SplitIntoStackMaxToInventoryLocationClient(
il);
628 else if (
cmenu.Count() >= 1)
637 if (m_am_entity1 ==
null || m_am_entity2 ==
null)
return;
641 player.GetCraftingManager().SetInventoryCraft(
id,
ItemBase.Cast(m_am_entity1),
ItemBase.Cast(m_am_entity2));
651 string name =
w.GetName();
652 name.Replace(
"PanelWidget",
"Render");
744 MissionGameplay
mission = MissionGameplay.Cast(
GetGame().GetMission());
767 GetGame().GetPlayer().GetHumanInventory().ClearUserReservedLocationSynced(
m_Item);
794 if (
g_Game.IsLeftCtrlDown())
798 if (
m_Item.GetTargetQuantityMax() <
m_Item.GetQuantity())
809 m_Obj.GetInventory().GetCurrentInventoryLocation(
il);
825 string name =
w.GetName();
826 name.Replace(
"PanelWidget",
"Render");
852 m_Item.GetInventory().GetCurrentInventoryLocation(
ilSrc);
855 if (
ilDst.GetParent().GetInventory().LocationCanAddEntity(
ilDst))
858 player.GetHumanInventory().ClearUserReservedLocation(
m_Item);
884 if (parent.GetInventory().LocationCanAddEntity(
ilDst))
886 player.GetHumanInventory().ClearUserReservedLocation(
m_Item);
906 string name =
w.GetName();
907 name.Replace(
"PanelWidget",
"Render");
960#ifdef PLATFORM_CONSOLE
1004 GetMainWidget().SetSort(
x);
1030 menu.RefreshQuickbar();
1042 if (
m_Item.GetInventory().GetFlipCargo())
1077 ContainerWithCargo
item = ContainerWithCargo.Cast(
m_Parent.m_Parent);
1094 ContainerWithCargo
item = ContainerWithCargo.Cast(
m_Parent.m_Parent);
1143 GetMainWidget().Update();
1151 GetRootWidget().SetSize(1, 1);
1178 if (!
wpn.IsShowingChamberedBullet())
1242 for (
i = 0;
i <
wpn.GetMuzzleCount();
i++)
1252 if (
wpn.IsChamberFull(
i))
1259 else if (
wpn.IsChamberFiredOut(
i))
1324 GetMainWidget().SetSort(
index);
1325 GetMainWidget().Update();
1330 return GetMainWidget().GetSort();
1348#ifdef PLATFORM_CONSOLE
1464 for (
int i = 0;
i <
wpn.GetMuzzleCount();
i++)
1470 Widget ammoIcon =
Widget.Cast(
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/inventory_new/ammo_icon.layout", GetMainWidget()));
1483 ammoIconImg.LoadImageFile(0,
"set:dayz_gui image:cartridge_pistol");
1484 ammoIconImg.LoadImageFile(1,
"set:dayz_gui image:shell_pistol");
1485 ammoIconImg.LoadImageFile(2,
"set:dayz_gui image:jam_pistol");
1490 ammoIconImg.LoadImageFile(0,
"set:dayz_gui image:cartridge_int");
1491 ammoIconImg.LoadImageFile(1,
"set:dayz_gui image:shell_int");
1492 ammoIconImg.LoadImageFile(2,
"set:dayz_gui image:jam_int");
1497 ammoIconImg.LoadImageFile(0,
"set:dayz_gui image:cartridge_fp");
1498 ammoIconImg.LoadImageFile(1,
"set:dayz_gui image:shell_fp");
1499 ammoIconImg.LoadImageFile(2,
"set:dayz_gui image:jam_fp");
1504 ammoIconImg.LoadImageFile(0,
"set:dayz_gui image:cartridge_shell");
1505 ammoIconImg.LoadImageFile(1,
"set:dayz_gui image:shell_shell");
1506 ammoIconImg.LoadImageFile(2,
"set:dayz_gui image:jam_shell");
1543 m_AmmoTypeIcon.LoadImageFile(0,
"set:dayz_gui image:armor_piercing");
1641#ifndef PLATFORM_CONSOLE
1678#ifndef PLATFORM_CONSOLE
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
FindInventoryLocationType
flags for searching locations in inventory
ref Widget m_RootWidget[MAX_SIMULTANIOUS_PLAYERS]
static bool IsAttachmentReachable(EntityAI e, string att_slot_name="", int slot_id=-1, float range=1.5)
represents base for cargo storage for entities
Super root of all classes in Enforce script.
static ColorManager GetInstance()
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
script counterpart to engine's class Inventory
static bool CanForceSwapEntitiesEx(notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst)
void ShowActionMenuCombine(EntityAI entity1, EntityAI entity2, int combinationFlags, Widget w, bool color_test)
Widget m_MicromanagedPanel
void RevertToOriginalFlip()
void UpdateFrameColor(EntityAI selectedEntity, EntityAI targetEntity, int combinationFlag, Widget w, InventoryLocation il=null)
void DoubleClick(Widget w, int x, int y, int button)
void DraggingOverCombine(Widget w, int x, int y, Widget receiver)
bool m_PreviousFlipOrientation
override void SetParentWidget()
int GetRelevantInventoryAction(int relevantActions)
void ToRefresh(Icon icon, Icon icon2)
void DraggingOverSwap(Widget w, int x, int y, Widget receiver)
bool MouseEnter(Widget w, int x, int y)
void OnDraggingOverBackground(Widget w, int x, int y, Widget reciever)
override void SetLayoutName()
void OnPerformRecipe(int id)
void SetPosEx(bool refresh=true)
void SetItemSizeEx(bool refresh=true)
void MouseClick(Widget w, int x, int y, int button)
Widget GetSelectedWidget()
void DraggingOver(Widget w, int x, int y, Widget receiver)
void UpdateFlip(bool flipped)
bool CombineItems(EntityAI entity1, EntityAI entity2)
TextWidget m_QuantityItem
override void SetActive(bool active)
void CheckHasQuantityEx(bool refresh=true)
void CheckHasTemperature()
void SetSize(int x, int y)
void RefreshPos(int row, int column)
void OnPerformCombination(int combinationFlags)
void SetPos(int x, int y)
const int NUMBER_OF_TIMERS
void DestroyWhiteBackground()
Widget GetMicromanagedPanel()
void Icon(LayoutHolder parent, bool hands_icon=false)
void SetItemPreviewEx(bool refresh=true)
void Swap(Widget w, int x, int y, Widget receiver)
void DropReceivedFromMain(Widget w, int x, int y, Widget receiver)
ProgressBarWidget m_QuantityProgress
bool MouseLeave(Widget w, Widget s, int x, int y)
TextWidget m_ItemSizeWidget
ref array< ImageWidget > m_AmmoIcons
void CreateWhiteBackground()
ItemPreviewWidget m_ItemPreview
void InitLock(EntityAI parent, EntityAI obj, int x_pos, int y_pos, bool flip)
override void UpdateInterval()
bool FlagAction(EntityAI entity1, EntityAI entity2, int combinationFlags)
void Combine(Widget w, int x, int y, Widget receiver)
void InitEx(EntityAI obj, bool refresh=true)
bool PerformCombination(EntityAI selectedEntity, EntityAI targetEntity, int combinationFlag, InventoryLocation ilSwapDst=null)
ImageWidget m_AmmoTypeIcon
void DropReceivedFromBackground(Widget w, int x, int y, Widget reciever)
void CheckIsMagazineEx(bool refresh=true)
static const int PERFORM_ACTION
static const int ADD_AS_CARGO
static const int ATTACH_MAGAZINE
static const int SWAP_MAGAZINE
static const int SET_ACTION
static const int ADD_AS_ATTACHMENT
static const int COMBINE_QUANTITY2
static int GetCombinationFlags(EntityAI entity1, EntityAI entity2)
static int GetChosenCombinationFlag(EntityAI selectedEntity, EntityAI targetEntity, int relevantFlags, out InventoryLocation dst=null)
static ItemManager GetInstance()
static float GetItemQuantity(InventoryItem item)
static int HasItemQuantity(notnull EntityAI item)
static float GetItemQuantityMax(InventoryItem item)
static string GetItemQuantityText(EntityAI item, bool showMax=false)
static void TakeOrSplitToInventoryLocation(notnull PlayerBase player, notnull InventoryLocation dst)
static void TakeOrSplitToInventory(notnull PlayerBase player, notnull EntityAI target, notnull EntityAI item)
proto native CGame GetGame()
const int QUANTITY_PROGRESS
const int QUANTITY_HIDDEN
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float Round(float f)
Returns mathematical round of value.
proto void GetMousePos(out int x, out int y)
int ARGB(int a, int r, int g, int b)
int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.