DayZ 1.24
Loading...
Searching...
No Matches
HandsHeader Class Reference
Inheritance diagram for HandsHeader:
[legend]
Collaboration diagram for HandsHeader:
[legend]

Protected Member Functions

void HandsHeader (LayoutHolder parent, string function_name)
 
override void SetLayoutName ()
 
override void UpdateInterval ()
 
void ShowCollapseButtons (bool show, bool force=false)
 

Protected Attributes

bool m_ForceHideCollapseButtons
 
Widget m_ItemHeader
 

Additional Inherited Members

- Private Member Functions inherited from Header
void Header (LayoutHolder parent, string function_name)
 
void SetName (string name)
 
void SetItemPreview (EntityAI entity_ai)
 
void DraggingOverHeader (Widget w, int x, int y, Widget receiver)
 
void OnDropReceivedFromHeader (Widget w, int x, int y, Widget receiver)
 
override void SetActive (bool active)
 
void ShowCollapseButton (bool state)
 
- Private Attributes inherited from Header
int m_DefaultColor
 
int m_DefaultFontSize
 
EntityAI m_Entity
 
Widget m_CollapseButton
 
Widget m_UpArrowButton
 
Widget m_DownArrowButton
 
TextWidget m_HeaderText
 

Detailed Description

Definition at line 1 of file HandsHeader.c.

Constructor & Destructor Documentation

◆ HandsHeader()

void HandsHeader::HandsHeader ( LayoutHolder parent,
string function_name )
inlineprotected

Definition at line 6 of file HandsHeader.c.

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 }
Widget m_ItemHeader
Definition HandsHeader.c:4
void ShowCollapseButtons(bool show, bool force=false)
Definition HandsHeader.c:45
int m_DefaultFontSize
Definition Header.c:4
int m_DefaultColor
Definition Header.c:3

References Header::m_DefaultColor, Header::m_DefaultFontSize, m_ItemHeader, and ShowCollapseButtons().

Member Function Documentation

◆ SetLayoutName()

override void HandsHeader::SetLayoutName ( )
inlineprotected

Definition at line 18 of file HandsHeader.c.

19 {
20 m_LayoutName = WidgetLayoutName.HandsHeader;
21 }
const string HandsHeader

References WidgetLayoutName::HandsHeader.

◆ ShowCollapseButtons()

void HandsHeader::ShowCollapseButtons ( bool show,
bool force = false )
inlineprotected

Definition at line 45 of file HandsHeader.c.

46 {
48#ifdef PLATFORM_CONSOLE
49 m_CollapseButton.Show(false);
50#else
51 m_CollapseButton.Show(show);
52#endif
53 }
bool m_ForceHideCollapseButtons
Definition HandsHeader.c:3
Widget m_CollapseButton
Definition Header.c:8

References Header::m_CollapseButton, and m_ForceHideCollapseButtons.

Referenced by HandsHeader().

◆ UpdateInterval()

override void HandsHeader::UpdateInterval ( )
inlineprotected

Definition at line 23 of file HandsHeader.c.

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 }
PlayerBase GetPlayer()
proto native CGame GetGame()

References GetGame(), GetPlayer(), and m_ItemHeader.

Member Data Documentation

◆ m_ForceHideCollapseButtons

bool HandsHeader::m_ForceHideCollapseButtons
protected

Definition at line 3 of file HandsHeader.c.

Referenced by ShowCollapseButtons().

◆ m_ItemHeader

Widget HandsHeader::m_ItemHeader
protected

Definition at line 4 of file HandsHeader.c.

Referenced by HandsHeader(), and UpdateInterval().


The documentation for this class was generated from the following file: