5 ref ScriptInvoker m_OnFinished =
new ScriptInvoker();
7 const float TRANSITION_TIME = 0.5;
9 const float FADEIN_TIME_DUST = 10;
10 const float FADEIN_TIME_ART = 4;
11 const float FADEIN_TIME_INFO = 0.5;
14 override protected void HandlerAttached(Widget w)
16 super.HandlerAttached(w);
18 WidgetManager.SetCursor(12);
21 m_Widgets.m_wPressKeyMsg.SetTextFormat(
"#AR-SplashScreen_Continue",
"<color rgba='226, 167, 79, 255'><action name='CloseSplashScreen' index=0/></color>");
26 float dust1pos[2] = {15000, 0};
27 float dust2pos[2] = {35000, 0};
29 AnimateWidget.Opacity(
m_Widgets.m_wDust1, 0.35, 1 / FADEIN_TIME_DUST);
30 AnimateWidget.Opacity(
m_Widgets.m_wDust2, 0.35, 1 / FADEIN_TIME_DUST);
31 AnimateWidget.Position(
m_Widgets.m_wDust1, dust1pos, 0.0005);
32 AnimateWidget.Position(
m_Widgets.m_wDust2, dust2pos, 0.0005);
38 AnimateWidget.Opacity(
m_Widgets.m_wWarning, 1, 1 / FADEIN_TIME_INFO);
42 Widget buildVersion =
GetGame().GetWorkspace().CreateWidgets(
"{B7A765172F0BD4D9}UI/layouts/Common/GameVersionWatermark.layout", w);
46 buildVersion.SetOpacity(0);
47 AnimateWidget.Opacity(buildVersion, 0.2, 1 / FADEIN_TIME_ART);
52 bool isExperimentalBuild =
GetGame().IsExperimentalBuild();
54 #ifdef DEBUG_WARNING_SCREEN
55 isExperimentalBuild =
true;
58 m_Widgets.m_wExperimentalBuild.SetOpacity(isExperimentalBuild);
60 if (isExperimentalBuild &&
m_Widgets.m_wArtExperimental)
63 AnimateWidget.Opacity(
m_Widgets.m_wArtExperimental, 1, 1 / FADEIN_TIME_ART);
67 GetGame().GetInputManager().AddActionListener(
"CloseSplashScreen", EActionTrigger.DOWN, OnInput);
71 override protected void InitWidgets()
80 m_Widgets.m_wArtExperimental.SetOpacity(0);
90 void ActivateContext()
92 GetGame().GetInputManager().ActivateContext(
"BetaWarningContext", 1);
93 GetGame().GetCallqueue().CallLater(ActivateContext, 0);
99 WidgetManager.SetCursor(0);
102 m_Widgets.m_wPressKeyMsg.SetVisible(
false);
105 m_Widgets.m_wBlackOverlay.SetVisible(
true);
106 AnimateWidget.Opacity(
m_Widgets.m_wBlackOverlay, 1, 1 / TRANSITION_TIME);
108 GetGame().GetCallqueue().CallLater(OnFadedOut, TRANSITION_TIME * 1000 * 1.1);
109 GetGame().GetInputManager().RemoveActionListener(
"CloseSplashScreen", EActionTrigger.DOWN, OnInput);
116 m_Widgets.m_wBackground.SetVisible(
false);
118 AnimateWidget.Opacity(
m_Widgets.m_wBlackOverlay, 0, 1 / TRANSITION_TIME);
120 m_OnFinished.Invoke();
122 GetGame().GetCallqueue().CallLater(Close, TRANSITION_TIME * 1000 * 1.1);
128 GetGame().GetCallqueue().Remove(ActivateContext);