DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
HudDebugWinBase.c
См. документацию.
2{
4 protected bool m_Show;
5 protected bool m_RPCSent;
6
7 //============================================
8 // Constructor
9 //============================================
10 void HudDebugWinBase( Widget widget_root )
11 {
12 m_WgtRoot = widget_root;
13 }
14
15 //============================================
16 // GetType
17 //============================================
18 int GetType()
19 {
20 return HudDebug.HUD_WIN_UNDEFINED;
21 }
22
23 void Init( Widget widget_root );
24
25 void SetUpdate( bool state );
26
27 void Update()
28 {
29 if(m_Show && !m_RPCSent)
30 {
31 SetUpdate(true);
32 }
33 }
34
35
36 //============================================
37 // SetUpdate
38 //============================================
40 {
41 m_RPCSent = true;
42 }
43
44
45 //============================================
46 // Show
47 //============================================
48 void Show()
49 {
50 m_WgtRoot.Show(true);
51 m_Show = true;
52 }
53
54 //============================================
55 // Hide
56 //============================================
57 void Hide()
58 {
59 m_WgtRoot.Show(false);
60 m_Show = false;
61 }
62
63 //============================================
64 // Is visible
65 //============================================
66 bool IsVisible()
67 {
68 return m_WgtRoot.IsVisible();
69 }
70
71 //============================================
72 // FitWindowByContent
73 //============================================
74 void FitWindowByContent( TextListboxWidget wgt )
75 {
76 int size_of_value = 17;
77 SetValueListSize( 250, size_of_value * wgt.GetNumItems(), wgt );
78 }
79
80 //============================================
81 // SetSize
82 //============================================
83 void SetValueListSize( int x, int y, TextListboxWidget wgt )
84 {
85 int offset = 10;
86 int size_of_title = 20;
87
88 wgt.SetSize( x, y );
89
90 int root_size_x = x + ( 2 * offset );
91 int root_size_y = y + ( 2 * offset ) + size_of_title;
92
93 m_WgtRoot.SetSize( root_size_x, root_size_y );
94 }
95}
void HudDebug()
Определения HudDebug.c:108
Icon x
Icon y
bool m_Show
Определения HudDebugWinBase.c:4
void Show()
Определения HudDebugWinBase.c:48
bool m_RPCSent
Определения HudDebugWinBase.c:5
void HudDebugWinBase(Widget widget_root)
Определения HudDebugWinBase.c:10
void SetRPCSent()
Определения HudDebugWinBase.c:39
void Hide()
Определения HudDebugWinBase.c:57
Widget m_WgtRoot
Определения HudDebugWinBase.c:3
void Init(Widget widget_root)
void FitWindowByContent(TextListboxWidget wgt)
Определения HudDebugWinBase.c:74
void SetUpdate(bool state)
int GetType()
Определения HudDebugWinBase.c:18
bool IsVisible()
Определения HudDebugWinBase.c:66
void SetValueListSize(int x, int y, TextListboxWidget wgt)
Определения HudDebugWinBase.c:83
void Update()
Определения HudDebugWinBase.c:27
Определения EnWidgets.c:190