DayZ
1.24
Loading...
Searching...
No Matches
HudDebugWinCharDebug.c
Go to the documentation of this file.
1
class
HudDebugWinCharDebug
extends
HudDebugWinBase
2
{
3
private
PluginDeveloper
m_ModuleDeveloper
;
4
5
private
TextWidget
m_PlayerPosTextWidget
;
6
private
TextWidget
m_ClipboardTextWidget
;
7
8
//============================================
9
// HudDebugWinCharDebug
10
//============================================
11
void
HudDebugWinCharDebug
(
Widget
widget_root
)
12
{
13
m_PlayerPosTextWidget =
TextWidget
.Cast(
widget_root
.FindAnyWidget(
"txt_PlayerPos"
));
14
m_ClipboardTextWidget =
TextWidget
.Cast(
widget_root
.FindAnyWidget(
"txt_Clipboard"
));
15
}
16
17
//============================================
18
// ~HudDebugWinCharDebug
19
//============================================
20
void
~HudDebugWinCharDebug
()
21
{
22
}
23
24
//============================================
25
// Update
26
//============================================
27
override
void
Update
()
28
{
29
super
.Update();
30
31
PlayerBase
player
=
PlayerBase
.Cast(
GetGame
().
GetPlayer
());
32
if
(
player
!=
NULL
)
33
{
34
vector
pos =
player
.GetPosition();
35
string
pos_str
=
"Pos: "
+ pos[0].
ToString
() +
" "
+ pos[2].
ToString
();
36
m_PlayerPosTextWidget.SetText(
pos_str
);
37
}
38
39
string
clipboard
;
40
GetGame
().CopyFromClipboard(
clipboard
);
41
clipboard
=
clipboard
.Substring(0,
Math
.
Min
(
clipboard
.Length(), 128));
//max 128 chars
42
clipboard
=
"Clipboard: "
+
clipboard
;
43
m_ClipboardTextWidget.SetText(
clipboard
);
44
}
45
46
//============================================
47
// GetWinType
48
//============================================
49
override
int
GetType
()
50
{
51
return
HudDebug
.HUD_WIN_CHAR_DEBUG;
52
}
53
}
HudDebug
void HudDebug()
Definition
HudDebug.c:104
GetPlayer
PlayerBase GetPlayer()
Definition
ModifierBase.c:47
HudDebugWinBase
Definition
HudDebugWinBase.c:2
HudDebugWinBase::m_PlayerPosTextWidget
TextWidget m_PlayerPosTextWidget
Definition
HudDebugWinCharDebug.c:5
HudDebugWinBase::Update
override void Update()
Definition
HudDebugWinCharDebug.c:27
HudDebugWinBase::m_ModuleDeveloper
PluginDeveloper m_ModuleDeveloper
Definition
HudDebugWinCharDebug.c:3
HudDebugWinBase::HudDebugWinCharDebug
void HudDebugWinCharDebug(Widget widget_root)
Definition
HudDebugWinCharDebug.c:11
HudDebugWinBase::GetType
override int GetType()
Definition
HudDebugWinCharDebug.c:49
HudDebugWinBase::~HudDebugWinCharDebug
void ~HudDebugWinCharDebug()
Definition
HudDebugWinCharDebug.c:20
HudDebugWinBase::m_ClipboardTextWidget
TextWidget m_ClipboardTextWidget
Definition
HudDebugWinCharDebug.c:6
Math
Definition
EnMath.c:7
Param3
Definition
EntityAI.c:95
PlayerBase
Definition
PlayerBaseClient.c:2
TextWidget
Definition
EnWidgets.c:220
Widget
Definition
EnWidgets.c:190
vector
Definition
EnConvert.c:106
vector::ToString
proto string ToString(bool beautify=true)
Vector to string.
GetGame
proto native CGame GetGame()
Math::Min
static proto float Min(float x, float y)
Returns smaller of two given values.
scripts
5_Mission
GUI
ScriptsHudDebug
HudDebugWinCharDebug.c
Generated by
1.10.0