DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
HudDebugWinCharDebug.c
См. документацию.
1class HudDebugWinCharDebug extends HudDebugWinBase
2{
3 private PluginDeveloper m_ModuleDeveloper;
4
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 //============================================
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}
void HudDebug()
Определения HudDebug.c:108
PlayerBase GetPlayer()
Определения ModifierBase.c:51
proto void CopyFromClipboard(out string text)
TextWidget m_PlayerPosTextWidget
Определения HudDebugWinCharDebug.c:5
override void Update()
Определения HudDebugWinCharDebug.c:27
PluginDeveloper m_ModuleDeveloper
Определения HudDebugWinCharDebug.c:3
void HudDebugWinCharDebug(Widget widget_root)
Определения HudDebugWinCharDebug.c:11
override int GetType()
Определения HudDebugWinCharDebug.c:49
void ~HudDebugWinCharDebug()
Определения HudDebugWinCharDebug.c:20
TextWidget m_ClipboardTextWidget
Определения HudDebugWinCharDebug.c:6
Определения HudDebugWinBase.c:2
Определения EnMath.c:7
Определения PlayerBaseClient.c:2
Определения EnWidgets.c:220
Определения EnWidgets.c:190
proto string ToString(bool beautify=true)
Vector to string.
Определения EnConvert.c:106
proto native CGame GetGame()
static proto float Min(float x, float y)
Returns smaller of two given values.
proto native int Length()
Returns length of string.
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.