Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SplashScreen.c
Go to the documentation of this file.
1
//#define DEBUG_SPLASH_SCREENS
2
3
//------------------------------------------------------------------------------------------------
4
class
SplashScreen
:
BaseLoadingAnim
5
{
6
// Game intro splash screen, shown when game starts-up + used for EA extra screen
7
const
string
INTRO_SPLASH_LAYOUT =
"{1C71B463B3B66BAB}UI/layouts/Menus/MainMenu/IntroSplashScreen.layout"
;
8
9
// Scenario pre-load screen
10
const
string
SCENARIO_PRELOAD_LAYOUT =
"{4C8B29889444BDA3}UI/layouts/Menus/LoadingScreen/ScenarioLoadingScreen.layout"
;
11
12
static
int
s_iSplashShown;
13
static
protected
bool
s_bOpened
;
14
15
private
ref
SCR_IntroSplashScreenComponent
m_IntroSplashScreenComponent;
16
private
ref
SCR_PreloadScreenComponent
m_PreloadScreenComponent;
17
18
//------------------------------------------------------------------------------------------------
19
override
void
Load
()
20
{
21
#ifdef DEBUG_SPLASH_SCREENS
22
PrintFormat
(
">> %1 >> Load"
,
this
);
23
#endif
24
25
// Create intro splash screen; used when game is starting and loading the MainMenu world
26
if
(
BaseLoadingAnim
.s_NumReloads == 0 && s_iSplashShown == 0)
27
{
28
m_wRoot
= m_WorkspaceWidget.CreateWidgets(INTRO_SPLASH_LAYOUT, m_WorkspaceWidget);
29
30
if
(
m_wRoot
)
31
{
32
m_IntroSplashScreenComponent =
new
SCR_IntroSplashScreenComponent
();
33
m_wRoot
.AddHandler(m_IntroSplashScreenComponent);
34
}
35
}
36
// Create scenario preload screen; used when game is being restarted due to addons
37
else
38
{
39
m_wRoot
= m_WorkspaceWidget.CreateWidgets(SCENARIO_PRELOAD_LAYOUT, m_WorkspaceWidget);
40
41
if
(
m_wRoot
)
42
{
43
m_PreloadScreenComponent =
new
SCR_PreloadScreenComponent
();
44
m_wRoot
.AddHandler(m_PreloadScreenComponent);
45
}
46
}
47
48
s_iSplashShown++;
49
}
50
51
//------------------------------------------------------------------------------------------------
52
static
bool
IsOpen
()
53
{
54
return
s_bOpened;
55
}
56
57
//------------------------------------------------------------------------------------------------
58
override
void
Show
()
59
{
60
#ifdef DEBUG_LOADING_SCREENS
61
PrintFormat
(
">> %1 >> Show"
,
this
);
62
#endif
63
64
s_bOpened
=
true
;
65
66
WidgetManager.SetCursor(12);
// Hide cursor
67
super.Show();
68
}
69
70
//------------------------------------------------------------------------------------------------
71
override
void
Hide
()
72
{
73
#ifdef DEBUG_LOADING_SCREENS
74
PrintFormat
(
">> %1 >> Hide"
,
this
);
75
#endif
76
77
s_bOpened
=
false
;
78
79
if
(m_PreloadScreenComponent)
80
m_PreloadScreenComponent.OnHideInternal();
81
82
//WidgetManager.SetCursor(0); // Show cursor
83
super.Hide();
84
}
85
86
//------------------------------------------------------------------------------------------------
87
override
void
Update
(
float
timeSlice,
float
progress,
float
minDurationRatio)
88
{
89
if
(!
m_wRoot
)
90
return
;
91
92
if
(m_IntroSplashScreenComponent)
93
m_IntroSplashScreenComponent.Update(timeSlice);
94
else
95
m_PreloadScreenComponent.Update(timeSlice, progress, minDurationRatio);
96
}
97
98
//------------------------------------------------------------------------------------------------
99
static
int
GetGameReloads()
100
{
101
return
s_NumReloads;
102
}
103
};
m_wRoot
Widget m_wRoot
Definition
SCR_GameModeCleanSweep.c:25
IsOpen
proto native bool IsOpen()
SCR_IntroSplashScreenComponent
Definition
SCR_IntroSplashScreenComponent.c:2
SCR_PreloadScreenComponent
Definition
SCR_PreloadScreenComponent.c:2
SplashScreen
Definition
SplashScreen.c:5
SplashScreen::s_bOpened
bool s_bOpened
Definition
SplashScreen.c:13
Hide
override void Hide()
Definition
gameLib.c:268
Show
override void Show()
Definition
gameLib.c:262
Load
void Load()
Definition
gameLib.c:220
BaseLoadingAnim
void BaseLoadingAnim(WorkspaceWidget workspaceWidget)
Definition
gameLib.c:233
PrintFormat
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
Update
@ Update
Definition
SndComponentCallbacks.c:14
scripts
GameLib
LoadingScreens
SplashScreen.c
Generated by
1.17.0