Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
huddebugwintemperature.c
Go to the documentation of this file.
1
class
HudDebugWinTemperature
extends
HudDebugWinBase
2
{
3
private
PluginDeveloper m_ModuleDeveloper;
4
5
private
TextWidget
m_EnviroTextWidget
;
6
protected
PluginDeveloperSync
m_PluginDeveloperSync
;
7
//============================================
8
// HudDebugWinTemperature
9
//============================================
10
void
HudDebugWinTemperature
(
Widget
widget_root)
11
{
12
m_EnviroTextWidget
=
TextWidget
.Cast( widget_root.FindAnyWidget(
"txt_Temp"
) );
13
m_PluginDeveloperSync
= PluginDeveloperSync.Cast(
GetPlugin
( PluginDeveloperSync ) );
14
15
}
16
17
//============================================
18
// ~HudDebugWinTemperature
19
//============================================
20
void
~HudDebugWinTemperature
()
21
{
22
}
23
24
//============================================
25
// Set Update
26
//============================================
27
override
void
SetUpdate
(
bool
state )
28
{
29
//Disable update on server (PluginDeveloperSync)
30
PlayerBase
player =
PlayerBase
.Cast(
g_Game
.GetPlayer() );
31
32
//if client, send RPC
33
if
(
g_Game
.IsClient() )
34
{
35
CachedObjectsParams
.
PARAM1_BOOL
.param1 = state;
36
if
( player )
37
{
38
player.RPCSingleParam(
ERPCs
.DEV_TEMP_UPDATE,
CachedObjectsParams
.
PARAM1_BOOL
,
true
);
39
SetRPCSent
();
40
}
41
}
42
//else set directly
43
else
44
{
45
if
(
m_PluginDeveloperSync
)
46
{
47
m_PluginDeveloperSync
.EnableUpdate( state,
ERPCs
.DEV_TEMP_UPDATE, player );
48
}
49
}
50
}
51
52
//============================================
53
// Show / Hide
54
//============================================
55
override
void
Show
()
56
{
57
super.Show();
58
59
SetUpdate
(
true
);
60
}
61
62
override
void
Hide
()
63
{
64
super.Hide();
65
66
SetUpdate
(
false
);
67
}
68
69
70
//============================================
71
// Update
72
//============================================
73
override
void
Update
()
74
{
75
super.Update();
76
PluginDeveloperSync developer_sync = PluginDeveloperSync.Cast(
GetPlugin
( PluginDeveloperSync ) );
77
78
m_EnviroTextWidget
.SetText(developer_sync.m_EnvironmentDebugMessage);
79
int
sX, sY;
80
m_EnviroTextWidget
.GetTextSize(sX, sY);
81
m_EnviroTextWidget
.SetSize(sX, sY);
82
83
AutoHeightSpacer
spacer;
84
m_WgtRoot
.GetScript(spacer);
85
if
(spacer)
86
{
87
spacer.
Update
();
88
}
89
}
90
91
//============================================
92
// GetWinType
93
//============================================
94
override
int
GetType
()
95
{
96
return
HudDebug
.HUD_WIN_TEMPERATURE;
97
}
98
}
AutoHeightSpacer
Definition
autoheightspacer.c:3
AutoHeightSpacer::Update
void Update()
Definition
autoheightspacer.c:11
CachedObjectsParams
Definition
utilityclasses.c:10
CachedObjectsParams::PARAM1_BOOL
static ref Param1< bool > PARAM1_BOOL
Definition
utilityclasses.c:12
HudDebugWinBase
Definition
huddebugwinbase.c:2
HudDebugWinBase::Hide
override void Hide()
Definition
huddebugwintemperature.c:62
HudDebugWinBase::SetUpdate
override void SetUpdate(bool state)
Definition
huddebugwintemperature.c:27
HudDebugWinBase::~HudDebugWinTemperature
void ~HudDebugWinTemperature()
Definition
huddebugwintemperature.c:20
HudDebugWinBase::SetRPCSent
void SetRPCSent()
Definition
huddebugwinbase.c:39
HudDebugWinBase::Update
override void Update()
Definition
huddebugwintemperature.c:73
HudDebugWinBase::GetType
override int GetType()
Definition
huddebugwintemperature.c:94
HudDebugWinBase::SetUpdate
void SetUpdate(bool state)
HudDebugWinBase::HudDebugWinTemperature
void HudDebugWinTemperature(Widget widget_root)
Definition
huddebugwintemperature.c:10
HudDebugWinBase::m_PluginDeveloperSync
PluginDeveloperSync m_PluginDeveloperSync
Definition
huddebugwintemperature.c:6
HudDebugWinBase::m_EnviroTextWidget
TextWidget m_EnviroTextWidget
Definition
huddebugwintemperature.c:5
HudDebugWinBase::Show
override void Show()
Definition
huddebugwintemperature.c:55
HudDebugWinBase::m_WgtRoot
Widget m_WgtRoot
Definition
huddebugwinbase.c:3
PlayerBase
Definition
playerbaseclient.c:2
TextWidget
Definition
enwidgets.c:220
Widget
Definition
enwidgets.c:190
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
ERPCs
ERPCs
Definition
erpcs.c:2
HudDebug
void HudDebug()
Definition
huddebug.c:108
GetPlugin
PluginBase GetPlugin(typename plugin_type)
Definition
pluginmanager.c:325
Games
Dayz
scripts
5_mission
gui
scriptshuddebug
huddebugwintemperature.c
Generated by
1.17.0