DayZ
1.24
Loading...
Searching...
No Matches
HandsHeader.c
Go to the documentation of this file.
1
class
HandsHeader
:
Header
2
{
3
protected
bool
m_ForceHideCollapseButtons
;
4
protected
Widget
m_ItemHeader
;
5
6
void
HandsHeader
(
LayoutHolder
parent,
string
function_name
)
7
{
8
m_DefaultFontSize
= 24;
9
m_ItemHeader
= m_MainWidget.FindAnyWidget(
"hands_item_header"
);
10
11
m_MainWidget = GetMainWidget().FindAnyWidget(
"height_wrapper"
);
12
m_DefaultColor
= GetMainWidget().GetColor();
13
#ifdef PLATFORM_CONSOLE
14
ShowCollapseButtons
(
false
,
true
);
15
#endif
16
}
17
18
override
void
SetLayoutName
()
19
{
20
m_LayoutName =
WidgetLayoutName
.
HandsHeader
;
21
}
22
23
override
void
UpdateInterval
()
24
{
25
PlayerBase
p
=
PlayerBase
.Cast(
GetGame
().
GetPlayer
());
26
if
(!
p
)
27
return
;
28
29
EntityAI
item
=
p
.GetHumanInventory().GetEntityInHands();
30
/*if ( !m_ForceHideCollapseButtons )
31
{
32
if ( item && !item.GetInventory().IsInventoryLockedForLockType( HIDE_INV_FROM_SCRIPT ) && item.HasCargo() )
33
{
34
ShowCollapseButtons( true );
35
}
36
else
37
{
38
ShowCollapseButtons( false );
39
}
40
}*/
41
42
m_ItemHeader
.Show(
item
!=
null
);
43
}
44
45
void
ShowCollapseButtons
(
bool
show,
bool
force
=
false
)
46
{
47
m_ForceHideCollapseButtons
=
force
;
48
#ifdef PLATFORM_CONSOLE
49
m_CollapseButton
.Show(
false
);
50
#else
51
m_CollapseButton
.Show(show);
52
#endif
53
}
54
}
GetPlayer
PlayerBase GetPlayer()
Definition
ModifierBase.c:47
EntityAI
Definition
Building.c:6
HandsHeader
Definition
HandsHeader.c:2
HandsHeader::m_ItemHeader
Widget m_ItemHeader
Definition
HandsHeader.c:4
HandsHeader::HandsHeader
void HandsHeader(LayoutHolder parent, string function_name)
Definition
HandsHeader.c:6
HandsHeader::m_ForceHideCollapseButtons
bool m_ForceHideCollapseButtons
Definition
HandsHeader.c:3
HandsHeader::UpdateInterval
override void UpdateInterval()
Definition
HandsHeader.c:23
HandsHeader::ShowCollapseButtons
void ShowCollapseButtons(bool show, bool force=false)
Definition
HandsHeader.c:45
HandsHeader::SetLayoutName
override void SetLayoutName()
Definition
HandsHeader.c:18
Header
Definition
Header.c:2
Header::m_DefaultFontSize
int m_DefaultFontSize
Definition
Header.c:4
Header::m_DefaultColor
int m_DefaultColor
Definition
Header.c:3
Header::m_CollapseButton
Widget m_CollapseButton
Definition
Header.c:8
LayoutHolder
Definition
Container.c:2
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
Widget
Definition
EnWidgets.c:190
WidgetLayoutName
Definition
WidgetLayoutName.c:2
WidgetLayoutName::HandsHeader
const string HandsHeader
Definition
WidgetLayoutName.c:45
GetGame
proto native CGame GetGame()
scripts
5_Mission
GUI
InventoryNew
ContainedItems
Headers
HandsHeader.c
Generated by
1.10.0