Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
attachmentcategoriesslotscontainer.c
Go to the documentation of this file.
1
class
AttachmentCategoriesSlotsContainer
:
Container
2
{
3
ref
SlotsContainer
m_ItemsCont
;
4
5
void
AttachmentCategoriesSlotsContainer
(
LayoutHolder
parent,
int
index )
6
{
7
m_ItemsCont
=
new
SlotsContainer
(
this
, null);
8
m_Body.Insert(
m_ItemsCont
);
9
m_ItemsCont
.GetMainWidget().SetUserID( index );
10
11
for
(
int
k = 0; k <
ITEMS_IN_ROW
; k++ )
12
{
13
//WidgetEventHandler.GetInstance().RegisterOnDropReceived( m_ItemsCont.GetSlotIcon( k ).GetMainWidget(), m_Parent, "OnDropReceivedFromHeader" );
14
//WidgetEventHandler.GetInstance().RegisterOnDropReceived( m_ItemsCont.GetSlotIcon( k ).GetPanelWidget(), m_Parent, "OnDropReceivedFromHeader" );
15
16
WidgetEventHandler
.
GetInstance
().
RegisterOnDraggingOver
(
m_ItemsCont
.GetSlotIcon( k ).GetMainWidget(),
m_Parent
,
"DraggingOverHeader"
);
17
WidgetEventHandler
.
GetInstance
().
RegisterOnDraggingOver
(
m_ItemsCont
.GetSlotIcon( k ).GetPanelWidget(),
m_Parent
,
"DraggingOverHeader"
);
18
19
WidgetEventHandler
.
GetInstance
().
RegisterOnMouseButtonDown
(
m_ItemsCont
.GetSlotIcon( k ).GetMainWidget(),
m_Parent
,
"MouseClick"
);
20
WidgetEventHandler
.
GetInstance
().
RegisterOnMouseButtonDown
(
m_ItemsCont
.GetSlotIcon( k ).GetPanelWidget(),
m_Parent
,
"MouseClick"
);
21
22
WidgetEventHandler
.
GetInstance
().
RegisterOnMouseEnter
(
m_ItemsCont
.GetSlotIcon( k ).GetMainWidget(),
m_ItemsCont
.GetSlotIcon( k ),
"MouseEnterGhostSlot"
);
23
WidgetEventHandler
.
GetInstance
().
RegisterOnMouseLeave
(
m_ItemsCont
.GetSlotIcon( k ).GetMainWidget(),
m_ItemsCont
.GetSlotIcon( k ),
"MouseLeaveGhostSlot"
);
24
25
m_ItemsCont
.GetSlotIcon( k ).GetMainWidget().SetUserID( k );
26
m_ItemsCont
.GetSlotIcon( k ).GetPanelWidget().SetUserID( k );
27
}
28
}
29
30
override
bool
IsDisplayable
()
31
{
32
for
(
int
i = 0; i < m_Body.Count(); i++)
33
{
34
LayoutHolder
c = m_Body[i];
35
if
( c && c.IsDisplayable())
36
return
true
;
37
}
38
return
false
;
39
}
40
41
override
void
SetLayoutName
()
42
{
43
m_LayoutName =
WidgetLayoutName
.
Container
;
44
}
45
46
SlotsContainer
GetSlotsContainer
()
47
{
48
return
m_ItemsCont
;
49
}
50
51
override
EntityAI
GetFocusedItem
()
52
{
53
return
m_ItemsCont
.GetFocusedSlotsIcon().GetRender().GetItem();
54
}
55
56
int
GetParentID
()
57
{
58
return
m_ItemsCont
.GetMainWidget().GetUserID();
59
}
60
61
int
GetFocusedID
()
62
{
63
return
m_ItemsCont
.GetFocusedSlotsIcon().GetMainWidget().GetUserID();
64
}
65
66
void
ExpandCollapseContainer
(
bool
expand )
67
{
68
m_ItemsCont
.GetFocusedSlotsIcon().GetRadialIcon().Show( expand );
69
m_ItemsCont
.GetFocusedSlotsIcon().GetRadialIconClosed().Show( !expand );
70
}
71
72
override
bool
SelectItem
()
73
{
74
return
false
;
75
}
76
77
override
bool
Select
()
78
{
79
return
false
;
80
}
81
82
override
bool
Combine
()
83
{
84
return
false
;
85
}
86
87
override
bool
TransferItemToVicinity
()
88
{
89
return
false
;
90
}
91
92
override
bool
TransferItem
()
93
{
94
return
false
;
95
}
96
97
override
bool
SplitItem
()
98
{
99
return
false
;
100
}
101
102
override
bool
EquipItem
()
103
{
104
return
false
;
105
}
106
107
override
bool
CanCombine
()
108
{
109
return
false
;
110
}
111
112
override
bool
CanCombineAmmo
()
113
{
114
return
false
;
115
}
116
117
override
bool
IsEmpty
()
118
{
119
return
false
;
120
}
121
122
override
bool
IsItemActive
()
123
{
124
return
false
;
125
}
126
127
override
bool
IsItemWithQuantityActive
()
128
{
129
return
false
;
130
}
131
132
string
GetAttachmentCategory
(
string
config_path_attachment_categories,
int
i )
133
{
134
string
attachment_category;
135
g_Game
.ConfigGetChildName(config_path_attachment_categories, i, attachment_category);
136
return
attachment_category;
137
}
138
139
string
GetIconName
(
string
config_path_attachment_categories,
string
attachment_category )
140
{
141
string
icon_path = config_path_attachment_categories+
" "
+ attachment_category +
" icon"
;
142
string
icon_name;
143
g_Game
.ConfigGetText(icon_path, icon_name);
144
return
icon_name;
145
}
146
}
ITEMS_IN_ROW
const int ITEMS_IN_ROW
Definition
attachments.c:1
m_Parent
Entity m_Parent
Definition
cachedequipmentstoragebase.c:15
AttachmentCategoriesSlotsContainer::m_ItemsCont
ref SlotsContainer m_ItemsCont
Definition
attachmentcategoriesslotscontainer.c:3
AttachmentCategoriesSlotsContainer::IsItemActive
override bool IsItemActive()
Definition
attachmentcategoriesslotscontainer.c:122
AttachmentCategoriesSlotsContainer::SelectItem
override bool SelectItem()
Definition
attachmentcategoriesslotscontainer.c:72
AttachmentCategoriesSlotsContainer::TransferItem
override bool TransferItem()
Definition
attachmentcategoriesslotscontainer.c:92
AttachmentCategoriesSlotsContainer::GetIconName
string GetIconName(string config_path_attachment_categories, string attachment_category)
Definition
attachmentcategoriesslotscontainer.c:139
AttachmentCategoriesSlotsContainer::TransferItemToVicinity
override bool TransferItemToVicinity()
Definition
attachmentcategoriesslotscontainer.c:87
AttachmentCategoriesSlotsContainer::CanCombine
override bool CanCombine()
Definition
attachmentcategoriesslotscontainer.c:107
AttachmentCategoriesSlotsContainer::GetParentID
int GetParentID()
Definition
attachmentcategoriesslotscontainer.c:56
AttachmentCategoriesSlotsContainer::AttachmentCategoriesSlotsContainer
void AttachmentCategoriesSlotsContainer(LayoutHolder parent, int index)
Definition
attachmentcategoriesslotscontainer.c:5
AttachmentCategoriesSlotsContainer::GetFocusedID
int GetFocusedID()
Definition
attachmentcategoriesslotscontainer.c:61
AttachmentCategoriesSlotsContainer::GetSlotsContainer
SlotsContainer GetSlotsContainer()
Definition
attachmentcategoriesslotscontainer.c:46
AttachmentCategoriesSlotsContainer::CanCombineAmmo
override bool CanCombineAmmo()
Definition
attachmentcategoriesslotscontainer.c:112
AttachmentCategoriesSlotsContainer::Combine
override bool Combine()
Definition
attachmentcategoriesslotscontainer.c:82
AttachmentCategoriesSlotsContainer::EquipItem
override bool EquipItem()
Definition
attachmentcategoriesslotscontainer.c:102
AttachmentCategoriesSlotsContainer::IsItemWithQuantityActive
override bool IsItemWithQuantityActive()
Definition
attachmentcategoriesslotscontainer.c:127
AttachmentCategoriesSlotsContainer::GetAttachmentCategory
string GetAttachmentCategory(string config_path_attachment_categories, int i)
Definition
attachmentcategoriesslotscontainer.c:132
AttachmentCategoriesSlotsContainer::Select
override bool Select()
Definition
attachmentcategoriesslotscontainer.c:77
AttachmentCategoriesSlotsContainer::IsEmpty
override bool IsEmpty()
Definition
attachmentcategoriesslotscontainer.c:117
AttachmentCategoriesSlotsContainer::SetLayoutName
override void SetLayoutName()
Definition
attachmentcategoriesslotscontainer.c:41
AttachmentCategoriesSlotsContainer::GetFocusedItem
override EntityAI GetFocusedItem()
Definition
attachmentcategoriesslotscontainer.c:51
AttachmentCategoriesSlotsContainer::IsDisplayable
override bool IsDisplayable()
Definition
attachmentcategoriesslotscontainer.c:30
AttachmentCategoriesSlotsContainer::SplitItem
override bool SplitItem()
Definition
attachmentcategoriesslotscontainer.c:97
AttachmentCategoriesSlotsContainer::ExpandCollapseContainer
void ExpandCollapseContainer(bool expand)
Definition
attachmentcategoriesslotscontainer.c:66
Container
Definition
cargocontainer.c:3
EntityAI
Definition
inventoryitem.c:2
LayoutHolder
Definition
container.c:2
SlotsContainer
Definition
slotscontainer.c:2
WidgetEventHandler
Definition
widgeteventhandler.c:2
WidgetEventHandler::RegisterOnMouseButtonDown
void RegisterOnMouseButtonDown(Widget w, Managed eventHandler, string functionName)
Definition
widgeteventhandler.c:70
WidgetEventHandler::GetInstance
static WidgetEventHandler GetInstance()
Definition
widgeteventhandler.c:22
WidgetEventHandler::RegisterOnMouseEnter
void RegisterOnMouseEnter(Widget w, Managed eventHandler, string functionName)
Definition
widgeteventhandler.c:119
WidgetEventHandler::RegisterOnDraggingOver
void RegisterOnDraggingOver(Widget w, Managed eventHandler, string functionName)
Definition
widgeteventhandler.c:112
WidgetEventHandler::RegisterOnMouseLeave
void RegisterOnMouseLeave(Widget w, Managed eventHandler, string functionName)
Definition
widgeteventhandler.c:126
WidgetLayoutName
Definition
widgetlayoutname.c:2
WidgetLayoutName::Container
const string Container
Definition
widgetlayoutname.c:47
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
Games
Dayz
scripts
5_mission
gui
inventorynew
inherited
attachmentcategoriesslotscontainer.c
Generated by
1.17.0