Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_FadeInOutEffect.c
Go to the documentation of this file.
2{
3 //Widget
4 private ImageWidget m_wFadeInOut;
5
6 //------------------------------------------------------------------------------------------------
7 override void DisplayStartDraw(IEntity owner)
8 {
9 m_wFadeInOut = ImageWidget.Cast(m_wRoot.FindAnyWidget("FadeOut"));
10 }
11
12 //------------------------------------------------------------------------------------------------
15 void FadeOutEffect(bool fadeDirection, float seconds = 0.35)
16 {
17 if (seconds < 0.1)
18 return;
19
20 AnimateWidget.StopAllAnimations(m_wFadeInOut);
21 AnimateEffectVisibility(m_wFadeInOut, (int)fadeDirection, (int)fadeDirection, seconds, seconds);
22 }
23
24 //------------------------------------------------------------------------------------------------
25 protected override void ClearEffects()
26 {
27 if (m_wFadeInOut)
28 HideSingleEffect(m_wFadeInOut);
29 }
30};
Widget m_wRoot
static void StopAllAnimations(Widget w)
void AnimateEffectVisibility(notnull ImageWidget effectWidget, float opacity, float alpha, float opacitySpeed=1.0, float alphaSpeed=1.0, bool updateVisibility=true)
void HideSingleEffect(notnull ImageWidget effectWidget)
override void ClearEffects()