Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
attachmentswrapper.c
Go to the documentation of this file.
2 {
3  Attachments m_Attachments;
4  protected Widget m_AttachmentsFalseHeader;
5  protected RichTextWidget m_AttachmentsFalseHeaderText;
6 
7  void AttachmentsWrapper(LayoutHolder parent)
8  {
9  m_AttachmentsFalseHeader = m_RootWidget.FindAnyWidget( "attachmets_wrapper_header_spacer" );
10  m_AttachmentsFalseHeaderText = RichTextWidget.Cast(m_AttachmentsFalseHeader.FindAnyWidget("TextWidget0"));
11  m_AttachmentsFalseHeader.Show( false );
12  }
13 
14  void SetParent( Attachments atts )
15  {
16  m_Attachments = atts;
17  }
18 
19  override bool Select()
20  {
21  return m_Attachments.Select();
22  }
23 
24  override bool SelectItem()
25  {
26  return m_Attachments.SelectItem();
27  }
28 
29  override bool Combine()
30  {
31  return m_Attachments.Combine();
32  }
33 
34  override bool TransferItemToVicinity()
35  {
36  if (CanDrop())
37  {
38  return m_Attachments.TransferItemToVicinity();
39  }
40  return false;
41  }
42 
43  override bool TransferItem()
44  {
45  if (CanTakeToInventory())
46  {
47  return m_Attachments.TransferItem();
48  }
49  return false;
50  }
51 
52  override bool InspectItem()
53  {
54  return m_Attachments.InspectItem();
55  }
56 
57  override bool SplitItem()
58  {
59  return m_Attachments.SplitItem();
60  }
61 
62  override bool EquipItem()
63  {
64  return m_Attachments.EquipItem();
65  }
66 
67  override bool CanEquip()
68  {
69  return m_Attachments.CanEquip();
70  }
71 
72  override bool CanCombine()
73  {
74  return m_Attachments.CanCombine();
75  }
76 
77  override bool CanCombineAmmo()
78  {
79  return m_Attachments.CanCombineAmmo();
80  }
81 
82  override bool IsDisplayable()
83  {
84  return !IsEmpty();
85  }
86 
87  override bool IsItemActive()
88  {
89  return m_Attachments.IsItemActive();
90  }
91 
92  override bool IsItemWithQuantityActive()
93  {
94  return m_Attachments.IsItemWithQuantityActive();
95  }
96 
97  override void UpdateInterval()
98  {
99  super.UpdateInterval();
100  m_Attachments.UpdateInterval();
101  }
102 
103  int GetFocusedSlot()
104  {
105  return m_Attachments.GetFocusedSlot();
106  }
107 
108  void ShowFalseAttachmentsHeader(bool show)
109  {
110  m_AttachmentsFalseHeader.Show(show);
111  }
112 
113  void SetFalseAttachmentsHeaderText(string text)
114  {
115  m_AttachmentsFalseHeaderText.SetText(text);
116  }
117 
118  TextWidget GetFalseHeaderTextWidget()
119  {
120  return m_AttachmentsFalseHeaderText;
121  }
122 }
LayoutHolder
Definition: container.c:1
m_RootWidget
ref Widget m_RootWidget[MAX_SIMULTANIOUS_PLAYERS]
Definition: pluginremoteplayerdebugclient.c:14
IsEmpty
override bool IsEmpty()
Definition: fireplacebase.c:2454
Attachments
Definition: attachments.c:3
RichTextWidget
Definition: gameplay.c:315
TextWidget
Definition: enwidgets.c:219
AttachmentsGroupContainer
Definition: attachmentsgroupcontainer.c:1
Widget
Definition: enwidgets.c:189
AttachmentsWrapper
Definition: attachmentswrapper.c:1