Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_AutotestDebugMenu.c
Go to the documentation of this file.
1
#ifdef ENABLE_DIAG
2
3
modded
enum
SCR_DebugMenuID
4
{
5
DEBUGUI_AUTOTEST_PROGRESS
6
}
7
8
class
SCR_AutotestDebugMenu
9
{
10
ref set<typename> s_aAllTests =
new
set<typename>();
11
12
protected
static
ref SCR_AutotestDebugMenu
s_Instance
;
13
protected
static
bool
s_mRegistered;
14
15
protected
typename
m_sLastExecutedTest;
16
protected
int
m_iExecutedTests;
17
protected
int
m_iLastExecutedTestStart;
18
19
private
void
SCR_AutotestDebugMenu();
20
21
static
SCR_AutotestDebugMenu GetInstance()
22
{
23
if
(!
s_Instance
)
24
s_Instance
=
new
SCR_AutotestDebugMenu();
25
26
return
s_Instance
;
27
}
28
29
static
void
Terminate
()
30
{
31
delete
s_Instance
;
32
}
33
34
void
Update
()
35
{
36
if
(!s_mRegistered)
37
{
38
s_mRegistered =
true
;
39
DiagMenu.RegisterBool(
SCR_DebugMenuID
.DEBUGUI_AUTOTEST_PROGRESS,
""
,
"Autotest status"
,
"GameCode"
,
true
);
40
}
41
42
DbgUI.Begin(
"Autotest status"
);
43
TestBase currentTest = SCR_AutotestHarness.ActiveTestCase();
44
if
(currentTest)
45
{
46
DbgUI.Text(
string
.Format(
"%1/%2"
, GetCurrentTestNumber(currentTest), s_aAllTests.Count()));
47
DbgUI.Text(currentTest.GetName());
48
DbgUI.Text((System.GetUnixTime() - m_iLastExecutedTestStart).ToString() +
"s"
);
49
50
}
51
DbgUI.End();
52
}
53
54
protected
int
GetCurrentTestNumber(TestBase test)
55
{
56
if
(m_sLastExecutedTest != test.Type())
57
{
58
m_sLastExecutedTest = test.Type();
59
m_iLastExecutedTestStart = System.GetUnixTime();
60
m_iExecutedTests++;
61
}
62
63
return
m_iExecutedTests;
64
}
65
}
66
#endif
SCR_DebugMenuID
SCR_DebugMenuID
This enum contains all IDs for DiagMenu entries added in script.
Definition
DebugMenuID.c:4
Terminate
void Terminate(bool fadeOut=true)
Definition
SCR_AudioSource.c:128
s_Instance
SCR_SpawnerSlotManagerClass s_Instance
Class used for managing changes and removals of slots present in world.
Update
@ Update
Definition
SndComponentCallbacks.c:14
scripts
Autotest
Game
TestFramework
SCR_AutotestDebugMenu.c
Generated by
1.17.0