DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
HudDebugWinBase.c
См. документацию.
2{
4 protected bool m_Show;
5 protected bool m_RPCSent;
6
10
11 //============================================
12 // Constructor
13 //============================================
14 void HudDebugWinBase( Widget widget_root )
15 {
16 m_WgtRoot = widget_root;
17 }
18
19 //============================================
20 // GetType
21 //============================================
22 int GetType()
23 {
24 return HudDebug.HUD_WIN_UNDEFINED;
25 }
26
27 void Init( Widget widget_root );
28
29 void SetUpdate( bool state );
30
31 void Update(float timeslice)
32 {
33 if(m_Show && !m_RPCSent)
34 {
35 SetUpdate(true);
36 }
37 }
38
39
40 //============================================
41 // SetUpdate
42 //============================================
44 {
45 m_RPCSent = true;
46
47 }
48
49 //============================================
50 // Show
51 //============================================
52 void Show()
53 {
54 m_WgtRoot.Show(true);
55 m_Show = true;
56 }
57
58 //============================================
59 // Hide
60 //============================================
61 void Hide()
62 {
63 m_WgtRoot.Show(false);
64 m_Show = false;
65 }
66
67 //============================================
68 // Is visible
69 //============================================
70 bool IsVisible()
71 {
72 return m_WgtRoot.IsVisible();
73 }
74
75 //============================================
76 // FitWindowByContent
77 //============================================
78 void FitWindowByContent( TextListboxWidget wgt )
79 {
80 int size_of_value = 17;
81 SetValueListSize( 250, size_of_value * wgt.GetNumItems(), wgt );
82 }
83
84 //============================================
85 // SetSize
86 //============================================
87 void SetValueListSize(int x, int y, Widget wgt)
88 {
89 int offset = 10;
90 int sizeOfTitle = 20;
91
92 wgt.SetSize(x, y);
93
94 int rootSizex = x + (2 * offset);
95 int rootSizeY = y + (2 * offset) + sizeOfTitle;
96
97 m_WgtRoot.SetSize(rootSizex, rootSizeY);
98 }
99
100 void SetDragging(bool enable)
101 {
102 if(enable && !m_IsDragging)
104 else if (!enable && m_IsDragging)
106 m_IsDragging = enable;
107 }
108
110 {
111 int mx, my;
112 float wx, wy;
113 GetMousePos(mx, my);
114 m_WgtRoot.GetScreenPos(wx, wy);
115 m_DraggingOffset[0] = wx - mx;
116 m_DraggingOffset[1] = wy - my;
117 }
118
120}
void HudDebug()
Определения HudDebug.c:93
Icon x
Icon y
bool m_Show
Определения HudDebugWinBase.c:4
void OnDraggingStart()
Определения HudDebugWinBase.c:109
void SetDragging(bool enable)
Определения HudDebugWinBase.c:100
void Show()
Определения HudDebugWinBase.c:52
bool m_RPCSent
Определения HudDebugWinBase.c:5
void HudDebugWinBase(Widget widget_root)
Определения HudDebugWinBase.c:14
void SetRPCSent()
Определения HudDebugWinBase.c:43
void Hide()
Определения HudDebugWinBase.c:61
Widget m_WgtRoot
Определения HudDebugWinBase.c:3
void Init(Widget widget_root)
void OnDraggingEnd()
void SetValueListSize(int x, int y, Widget wgt)
Определения HudDebugWinBase.c:87
void FitWindowByContent(TextListboxWidget wgt)
Определения HudDebugWinBase.c:78
void SetUpdate(bool state)
void Update(float timeslice)
Определения HudDebugWinBase.c:31
int GetType()
Определения HudDebugWinBase.c:22
PluginConfigDebugProfile m_ConfigDebugProfile
Определения HudDebugWinBase.c:7
bool m_IsDragging
Определения HudDebugWinBase.c:8
bool IsVisible()
Определения HudDebugWinBase.c:70
vector m_DraggingOffset
Определения HudDebugWinBase.c:9
Определения EnWidgets.c:190
Определения EnConvert.c:119
proto void GetMousePos(out int x, out int y)