|
void | AttachmentCategoriesRow (LayoutHolder parent, int sort=-1) |
|
string | GetCategoryIdentifier () |
|
int | GetFocusedSlot () |
|
override bool | Select () |
|
override bool | TransferItem () |
|
override bool | TransferItemToVicinity () |
|
override bool | Combine () |
|
override bool | CanSplitEx (EntityAI focusedItem) |
|
override bool | SplitItem () |
|
override bool | EquipItem () |
|
override bool | CanCombine () |
|
override bool | CanCombineAmmo () |
|
override bool | IsItemActive () |
|
override bool | IsItemWithQuantityActive () |
|
override void | OnDropReceivedFromHeader (Widget w, int x, int y, Widget receiver) |
|
override void | UnfocusAll () |
|
override void | DraggingOverHeader (Widget w, int x, int y, Widget receiver) |
|
bool | DraggingOverGrid (Widget w, int x, int y, Widget reciever, CargoContainer cargo) |
|
void | DropReceived (Widget w, int x, int y, CargoContainer cargo) |
|
EntityAI | GetItemPreviewItem (Widget w) |
|
override void | Refresh () |
|
void | RefreshAllSlots () |
|
void | RefreshSlot (int row, int column, int slot_id, string slot_name) |
|
void | DoubleClick (Widget w, int x, int y, int button) |
|
void | MouseClick (Widget w, int x, int y, int button) |
|
void | Init (int attachments_categories_count, int i, string attachment_category, string config_path_attachment_categories, EntityAI entity, int parent_m_Body_count) |
|
override void | UpdateInterval () |
|
|
void | ContainerWithCargo (Container parent, int sort=-1) |
|
override bool | IsDisplayable () |
|
override bool | IsEmpty () |
|
override bool | IsItemActive () |
|
override bool | CanCombine () |
|
override bool | CanCombineAmmo () |
|
override bool | IsItemWithQuantityActive () |
|
void | LockCargo (bool value) |
|
override void | Open () |
|
override void | Close () |
|
override bool | IsOpened () |
|
override void | UpdateInterval () |
|
override bool | IsFirstContainerFocused () |
|
override bool | IsLastContainerFocused () |
|
override void | SetDefaultFocus (bool while_micromanagment_mode=false) |
|
override void | UnfocusAll () |
|
override bool | SplitItem () |
|
override bool | EquipItem () |
|
override bool | TransferItem () |
|
override bool | TransferItemToVicinity () |
|
override bool | InspectItem () |
|
void | SetEntity (EntityAI entity, int cargo_index=0, bool immedUpdate=true) |
|
EntityAI | GetEntity () |
|
override EntityAI | GetFocusedContainerEntity () |
|
EntityAI | GetItemPreviewItem (Widget w) |
|
bool | DraggingOverGrid (Widget w, int x, int y, Widget reciever) |
|
void | DropReceived (Widget w, int x, int y) |
|
void | TakeIntoHands (notnull PlayerBase player, notnull EntityAI item) |
|
override void | DraggingOverHeader (Widget w, int x, int y, Widget receiver) |
|
override void | DraggingOver (Widget w, int x, int y, Widget receiver) |
|
override void | OnDropReceivedFromHeader (Widget w, int x, int y, Widget receiver) |
|
void | ContainerWithCargoAndAttachments (LayoutHolder parent, int sort=-1) |
|
void | ~ContainerWithCargoAndAttachments () |
|
void | RecomputeContainers () |
|
void | AttachmentAddedEx (EntityAI item, string slot, EntityAI parent, bool immedUpdate=true) |
|
void | AttachmentAdded (EntityAI item, string slot, EntityAI parent) |
|
void | AttachmentRemoved (EntityAI item, string slot, EntityAI parent) |
|
override void | UpdateInterval () |
|
override EntityAI | GetFocusedContainerEntity () |
|
override void | UnfocusAll () |
|
override bool | IsLastIndex () |
|
override bool | IsFirstContainerFocused () |
|
override bool | IsLastContainerFocused () |
|
override void | MoveGridCursor (int direction) |
|
void | SetEntity (EntityAI entity, bool immedUpdate=true) |
|
void | HideCargo () |
|
void | ShowCargo () |
|
EntityAI | GetEntity () |
|
ItemPreviewWidget | GetItemPreviewWidgetDragOrDrop (Widget w) |
|
EntityAI | GetItemPreviewItem (Widget w) |
|
Widget | GetItemPreviewWidget (Widget w) |
|
void | MouseClick2 (Widget w, int x, int y, int button) |
|
void | DropReceived (Widget w, int x, int y, CargoContainer cargo) |
| NOTE Used for mouse only.
|
|
void | TakeAsAttachment (Widget w, Widget receiver) |
|
override void | OnDropReceivedFromHeader (Widget w, int x, int y, Widget receiver) |
|
void | OnDropReceivedFromHeader2 (Widget w, int x, int y, Widget receiver) |
|
void | DoubleClick (Widget w, int x, int y, int button) |
|
bool | DraggingOverGrid (Widget w, int x, int y, Widget reciever, CargoContainer cargo) |
|
override void | DraggingOver (Widget w, int x, int y, Widget receiver) |
|
override void | DraggingOverHeader (Widget w, int x, int y, Widget receiver) |
|
ref CargoContainer | m_CargoGrid |
|
int | m_CargoIndex = -1 |
|
ref Attachments | m_Atts |
|
ref map< EntityAI, ref CargoContainer > | m_AttachmentCargos |
|
ref map< EntityAI, ref AttachmentsWrapper > | m_AttachmentAttachmentsContainers |
|
ref map< EntityAI, ref Attachments > | m_AttachmentAttachments |
|
ref array< int > | m_AttachmentSlotsSorted |
|
Definition at line 1 of file AttachmentCategoriesRow.c.
◆ AttachmentCategoriesRow()
◆ CanCombine()
◆ CanCombineAmmo()
◆ CanSplitEx()
◆ Combine()
Definition at line 163 of file AttachmentCategoriesRow.c.
164 {
166 {
171
173 {
177 {
179 {
183 {
185 return true;
186 }
187 else
188 {
190 return true;
191 }
192 }
194 {
196 {
202 {
204 return true;
205 }
207 {
209 return true;
210 }
212 {
214 {
216 return true;
217 }
218 }
219 }
220 }
221 }
222 }
223 }
224 return false;
225 }
override bool CanCombine()
script counterpart to engine's class Inventory
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
static void TakeOrSplitToInventory(notnull PlayerBase player, notnull EntityAI target, notnull EntityAI item)
References CanCombine(), GameInventory::CanSwapEntitiesEx(), GetFocusedSlot(), GetGame(), InventorySlots::GetStackMaxForSlotId(), m_AttachmentCargos, m_Entity, and SplitItemUtils::TakeOrSplitToInventory().
◆ DoubleClick()
Definition at line 704 of file AttachmentCategoriesRow.c.
705 {
707 {
710 {
711 string name =
w.GetName();
712 name.Replace(
"PanelWidget",
"Render");
714 }
715
718
721
723 return;
724
725 if (
icon.IsOutOfReach())
726 return;
727
730 {
731 if (!
item.GetInventory().CanRemoveEntity())
732 return;
733
737 else
738 {
740 {
741 if (
item.GetTargetQuantityMax() <
item.GetQuantity())
743 else
745 }
746 else
747 {
749 {
750 if (
item.GetTargetQuantityMax() <
item.GetQuantity())
752 else
754 }
755 }
756 }
757
758 HideOwnedTooltip();
759
761 name.Replace(
"PanelWidget",
"Temperature");
762 w.FindAnyWidget(
name).Show(
false);
763 }
764 }
765 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
FindInventoryLocationType
flags for searching locations in inventory
References g_Game, GetGame(), GetPlayer(), m_Entity, and name.
◆ DraggingOverGrid()
bool AttachmentCategoriesRow::DraggingOverGrid |
( |
Widget | w, |
|
|
int | x, |
|
|
int | y, |
|
|
Widget | reciever, |
|
|
CargoContainer | cargo ) |
|
inlineprotected |
Definition at line 469 of file AttachmentCategoriesRow.c.
470 {
472 return false;
473
475
477 return false;
478
482
485
489 else
490 return false;
491
493 {
496 }
497 else
498 return false;
499
502 else
504
505 if (
w.FindAnyWidget(
"Cursor"))
506 w.FindAnyWidget(
"Cursor").SetColor(
color);
507 else
508 {
509 string name =
w.GetName();
510 name.Replace(
"PanelWidget",
"Cursor");
511 if (
w.FindAnyWidget(
name))
513 }
514
515 return true;
516 }
EntityAI GetItemPreviewItem(Widget w)
represents base for cargo storage for entities
References GetItemPreviewItem(), ColorManager::GREEN_COLOR, name, ColorManager::RED_COLOR, x, and y.
◆ DraggingOverHeader()
Definition at line 395 of file AttachmentCategoriesRow.c.
396 {
398 return;
401 {
402 string name =
w.GetName();
403 name.Replace(
"PanelWidget",
"Render");
405 }
408
410 return;
411
415 name.Replace(
"PanelWidget",
"Render");
419
422
424 {
426
427
429 {
433 }
435 {
439 }
440 else
441 {
444 }
445 }
447 {
449
451 {
455 }
456 else
457 {
460 }
461 }
462 else
463 {
466 }
467 }
static ColorManager GetInstance()
static ItemManager GetInstance()
References GameInventory::CanSwapEntitiesEx(), ColorManager::COMBINE_COLOR, ColorManager::GetInstance(), ItemManager::GetInstance(), InventorySlots::GetStackMaxForSlotId(), ColorManager::GREEN_COLOR, m_Entity, name, ColorManager::RED_COLOR, and ColorManager::SWAP_COLOR.
◆ DropReceived()
void AttachmentCategoriesRow::DropReceived |
( |
Widget | w, |
|
|
int | x, |
|
|
int | y, |
|
|
CargoContainer | cargo ) |
|
inlineprotected |
◆ EquipItem()
◆ GetCategoryIdentifier()
string AttachmentCategoriesRow::GetCategoryIdentifier |
( |
| ) |
|
|
inlineprotected |
◆ GetFocusedSlot()
int AttachmentCategoriesRow::GetFocusedSlot |
( |
| ) |
|
|
inlineprotected |
◆ GetItemPreviewItem()
◆ Init()
void AttachmentCategoriesRow::Init |
( |
int | attachments_categories_count, |
|
|
int | i, |
|
|
string | attachment_category, |
|
|
string | config_path_attachment_categories, |
|
|
EntityAI | entity, |
|
|
int | parent_m_Body_count ) |
|
inlineprotected |
Definition at line 823 of file AttachmentCategoriesRow.c.
824 {
827
829
832
838
841
845
847 {
851
853
856
860 {
865 else
867
870 }
871
876
880
883
886
890
892 }
894 }
PlayerSpawnPreset slotName
static proto native owned string GetSlotDisplayName(int id)
converts slot_id to string
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
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.
References GetGame(), GetHeader(), WidgetEventHandler::GetInstance(), InventorySlots::GetSlotDisplayName(), InventorySlots::GetSlotIdFromString(), StaticGUIUtils::IMAGESETGROUP_INVENTORY, ITEMS_IN_ROW, m_AttachmentsContainer, m_CategoryIdentifier, m_Entity, m_RowConfigPath, path, RefreshAllSlots(), slotName, and StaticGUIUtils::VerifyIconImageString().
◆ IsItemActive()
◆ IsItemWithQuantityActive()
override bool AttachmentCategoriesRow::IsItemWithQuantityActive |
( |
| ) |
|
|
inlineprotected |
◆ MouseClick()
◆ OnDropReceivedFromHeader()
Definition at line 299 of file AttachmentCategoriesRow.c.
300 {
311
313 {
318 }
319
322 return;
324
326 if (!
item.GetInventory().CanRemoveEntity() || !
player.CanManipulateInventory())
327 return;
328
333 {
334 if (
player.GetWeaponManager().CanAttachMagazine(
wpn,
mag))
335 player.GetWeaponManager().AttachMagazine(
mag);
336 }
338 {
342 {
344 return;
346 }
349 }
351 {
354
359 }
361 {
364
369 }
370
371
372
373
374 }
override void CombineItemsClient(EntityAI entity2, bool use_stack_max=true)
Super root of all classes in Enforce script.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
References GameInventory::CanSwapEntitiesEx(), Class::CastTo(), CombineItemsClient(), GetGame(), ItemManager::GetInstance(), GetItemPreviewItem(), GetPlayer(), and m_Entity.
◆ Refresh()
◆ RefreshAllSlots()
void AttachmentCategoriesRow::RefreshAllSlots |
( |
| ) |
|
|
inlineprotected |
◆ RefreshSlot()
void AttachmentCategoriesRow::RefreshSlot |
( |
int | row, |
|
|
int | column, |
|
|
int | slot_id, |
|
|
string | slot_name ) |
|
inlineprotected |
Definition at line 609 of file AttachmentCategoriesRow.c.
610 {
615
617 {
619 icon.GetMainWidget().Show(
false);
620 }
622 {
623 if (
icon.GetEntity())
624 {
625 icon.ClearRemainSelected();
626
629 {
633 }
634 }
635 icon.GetMainWidget().Show(
true);
636 }
637 else
638 {
639 icon.GetMainWidget().Show(
true);
642 else
644
647 {
652 }
653
655 {
657 {
662
665
666 SetOpenForSlotIcon(
cont.IsOpened(),
icon);
667 }
668 }
669
671 icon.GetRadialIconPanel().Show(
cont.IsDisplayable());
672
679 {
680 icon.GetMountedWidget().Show(
true);
682 }
683 else
684 icon.GetMountedWidget().Show(
false);
685
688
690 icon.GetOutOfReachWidget().Show(
false);
691 else
692 {
693 icon.GetOutOfReachWidget().Show(
true);
695 }
696
699 else
701 }
702 }
void Remove(Object object)
static bool IsAttachmentReachable(EntityAI e, string att_slot_name="", int slot_id=-1, float range=1.5)
void ContainerWithCargo(Container parent, int sort=-1)
static proto native owned string GetSlotName(int id)
converts slot_id to string
References ClosableContainer::ContainerWithCargo(), GetGame(), ItemManager::GetInstance(), InventorySlots::GetSlotName(), AttachmentsOutOfReach::IsAttachmentReachable(), m_AttachmentCargos, m_AttachmentsContainer, m_Entity, and Remove().
Referenced by RefreshAllSlots().
◆ Select()
◆ SplitItem()
◆ TransferItem()
◆ TransferItemToVicinity()
override bool AttachmentCategoriesRow::TransferItemToVicinity |
( |
| ) |
|
|
inlineprotected |
◆ UnfocusAll()
◆ UpdateInterval()
◆ m_AttachmentCargos
◆ m_AttachmentsContainer
◆ m_CategoryIdentifier
string AttachmentCategoriesRow::m_CategoryIdentifier |
|
protected |
◆ m_Refreshing
bool AttachmentCategoriesRow::m_Refreshing |
|
protected |
◆ m_RowConfigPath
string AttachmentCategoriesRow::m_RowConfigPath |
|
protected |
The documentation for this class was generated from the following file: