DayZ 1.24
Loading...
Searching...
No Matches
HandsHeader.c
Go to the documentation of this file.
2{
5
7 {
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 {
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 {
48#ifdef PLATFORM_CONSOLE
49 m_CollapseButton.Show(false);
50#else
51 m_CollapseButton.Show(show);
52#endif
53 }
54}
PlayerBase GetPlayer()
Widget m_ItemHeader
Definition HandsHeader.c:4
void HandsHeader(LayoutHolder parent, string function_name)
Definition HandsHeader.c:6
bool m_ForceHideCollapseButtons
Definition HandsHeader.c:3
override void UpdateInterval()
Definition HandsHeader.c:23
void ShowCollapseButtons(bool show, bool force=false)
Definition HandsHeader.c:45
override void SetLayoutName()
Definition HandsHeader.c:18
Definition Header.c:2
int m_DefaultFontSize
Definition Header.c:4
int m_DefaultColor
Definition Header.c:3
Widget m_CollapseButton
Definition Header.c:8
const string HandsHeader
proto native CGame GetGame()