26 RecomputeOpenedContainers();
48 GetMainWidget().Show(
false);
62 if (
m_Entity.CanDisplayAttachmentCategory(
row.GetCategoryIdentifier()))
64 if (
row.IsDisplayable())
87 ContainerWithCargo
cargo = ContainerWithCargo.Cast(m_Body[
i]);
93 if (!
cargo.IsVisible())
99 if (
cargo.IsVisible())
102 cargo.UpdateInterval();
104 RecomputeOpenedContainers();
113 if (
slots.IsDisplayable())
120 GetMainWidget().Show(
true);
162 icon_widget.GetParent().GetParent().GetParent().Update();
169 int count = m_Body.Count();
176 return super.CanDisplayAnyCategory();
185 m_SlotIcon.GetRadialIconPanel().Show(
true);
189 m_SlotIcon.GetRadialIconPanel().Show(
false);
226 if (m_OpenedContainers.Count() > m_ActiveIndex)
242 RecomputeOpenedContainers();
260 if (
m_Entity.GetInventory().GetCargo())
322 icon.GetRadialIconPanel().Show(
true);
329 if (
m_Entity.GetInventory().GetCargo())
335 icon.GetGhostSlot().Show(
true);
337 icon.SetSlotDisplayName(
m_Entity.ConfigGetString(
"GUIInventoryCargoName"));
340 icon.GetRadialIconPanel().Show(
true);
341 icon.GetMainWidget().Show(
true);
343 ContainerWithCargo
iwc =
new ContainerWithCargo(
this, -1);
354 RecomputeOpenedContainers();
363 string name =
w.GetName();
364 name.Replace(
"PanelWidget",
"Render");
371 if (
m_Entity.GetInventory().CanAddAttachment(
iw.GetItem()) &&
iw.GetItem().GetInventory().CanRemoveEntity())
372 GetGame().GetPlayer().PredictiveTakeEntityToTargetAttachment(
m_Entity,
iw.GetItem());
373 else if (
m_Entity.GetInventory().CanAddEntityToInventory(
iw.GetItem()) &&
iw.GetItem().GetInventory().CanRemoveEntity())
384 string name =
w.GetName();
385 name.Replace(
"PanelWidget",
"Render");
390 if (!
iw || !
iw.GetItem())
406 for (
int i = 1;
i < m_Body.Count();
i++)
408 m_Body.Get(
i).OnHide();
429 RecomputeOpenedContainers();
438 SetOpenForSlotIcon(
true);
452 else if (m_SlotIcon && m_SlotIcon.GetObject())
460 SetOpenForSlotIcon(
false,
icon);
477 if (m_OpenedContainers.Count() > m_ActiveIndex)
485 if (
c &&
c.IsDisplayable())
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
FindInventoryLocationType
flags for searching locations in inventory
ref Widget m_RootWidget[MAX_SIMULTANIOUS_PLAYERS]
override bool CanDisplayAnyCategory()
override void UpdateInterval()
int GetViewIndex(string config_path_attachment_categories, string attachment_category)
override void DraggingOverHeader(Widget w, int x, int y, Widget receiver)
SlotsIcon GetCargoSlotsIcon()
override void CollapseButtonOnMouseButtonDown(Widget w)
ref map< string, int > m_CategorySlotIndex
void ShowInSlots(string category, bool show)
override void UpdateRadialIcon()
override bool CanOpenCloseContainerEx(EntityAI focusedEntity)
void AttachmentCategoriesContainer(LayoutHolder parent, int sort=-1)
void SetEntity(EntityAI entity)
override void ExpandCollapseContainer()
override void OnDropReceivedFromHeader(Widget w, int x, int y, Widget receiver)
void LoadAttachmentCategoriesIcon(SlotsContainer items_cont, string icon_name, int slot_number)
void InitIconsContainers()
SlotsIcon m_CargoSlotsIcon
string GetAttachmentCategory(string config_path_attachment_categories, int i)
int GetAttachmentCategoriesCount(string config_path)
override bool CanSplitEx(EntityAI focusedEntity)
void MouseClick(Widget w)
override bool IsDisplayable()
string GetIconName(string config_path_attachment_categories, string attachment_category)
SlotsContainer GetSlotsContainer(int icons_row)
Super root of all classes in Enforce script.
ref CollapsibleHeader m_CollapsibleHeader
void SetCollapsibleHeaderArrowState(bool open)
override void Insert(LayoutHolder container, int pos=-1, bool immedUpdate=true)
void UpdateCollapseButtons()
static ColorManager GetInstance()
static ItemManager GetInstance()
override bool IsVisible()
static const int IMAGESETGROUP_INVENTORY
static string VerifyIconImageString(int imageset_group=IMAGESETGROUP_INVENTORY, string icon_name="")
Checks for improperly formated, legacy image names and corrects them to default format.
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.