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_PingEffectsEditorUIComponent.c
Go to the documentation of this file.
1
class
SCR_PingEffectsEditorUIComponent
:
ScriptedWidgetComponent
2
{
3
[
Attribute
(
"PingBorder"
)]
4
protected
string
m_sPingBorderName
;
5
6
[
Attribute
(
"PulseWidget"
)]
7
protected
string
m_sPulseWidgetName
;
8
9
[
Attribute
(
"2"
)]
10
protected
float
m_fPingBorderAnimationSpeed
;
11
12
[
Attribute
(
"1"
)]
13
protected
float
m_fPulsateAnimationSpeed
;
14
15
[
Attribute
(
"5"
,
desc
:
"The deletion is done with a seperate timer in SCR_PingEditorComponent"
)]
16
protected
int
m_iFadeOutDelaySeconds
;
17
18
protected
Widget
m_Root
;
19
20
//State
21
protected
bool
m_bWaitingForFade
=
true
;
22
23
//---- REFACTOR NOTE START: Hardcoded values
24
25
//------------------------------------------------------------------------------------------------
26
override
void
HandlerAttached
(
Widget
w)
27
{
28
m_Root
= w;
29
Widget
pingBorder = w.FindAnyWidget(
m_sPingBorderName
);
30
Widget
pulseWidget = w.FindAnyWidget(
m_sPulseWidgetName
);
31
32
if
(!pulseWidget || !pingBorder)
33
return
;
34
35
float
sizeBorder[2] = {150, 150};
36
float
sizePulse[2] = {70, 70};
37
AnimateWidget
.
Opacity
(pingBorder, 0,
m_fPingBorderAnimationSpeed
);
38
AnimateWidget
.
Size
(pingBorder, sizeBorder,
m_fPingBorderAnimationSpeed
);
39
40
WidgetAnimationBase
animationOpacity =
AnimateWidget
.
Opacity
(pulseWidget, 0,
m_fPulsateAnimationSpeed
);
41
if
(animationOpacity)
42
animationOpacity.SetRepeat(
true
);
43
44
WidgetAnimationBase
animationSize =
AnimateWidget
.
Size
(pulseWidget, sizePulse,
m_fPulsateAnimationSpeed
);
45
if
(animationSize)
46
animationSize.SetRepeat(
true
);
47
48
GetGame
().GetCallqueue().CallLater(
FadeOut
,
m_iFadeOutDelaySeconds
* 1000);
49
}
50
51
//---- REFACTOR NOTE END ----
52
53
//------------------------------------------------------------------------------------------------
54
//~Todo: Should delete the widget once fading is done rather then having a seperate delete timer
55
protected
void
FadeOut
()
56
{
57
m_bWaitingForFade
=
false
;
58
AnimateWidget
.
Opacity
(
m_Root
, 0, 1);
59
}
60
61
//------------------------------------------------------------------------------------------------
62
override
void
HandlerDeattached
(
Widget
w)
63
{
64
if
(
m_bWaitingForFade
)
65
GetGame
().GetCallqueue().Remove(
FadeOut
);
66
}
67
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
WidgetAnimationBase
void WidgetAnimationBase(Widget w, float speed)
Definition
WidgetAnimation.c:308
AnimateWidget
Definition
AnimateWidget.c:3
AnimateWidget::Size
static WidgetAnimationFrameSize Size(Widget widget, float size[2], float speed)
Definition
AnimateWidget.c:213
AnimateWidget::Opacity
static WidgetAnimationOpacity Opacity(Widget widget, float targetValue, float speed, bool toggleVisibility=false)
Definition
AnimateWidget.c:167
SCR_PingEffectsEditorUIComponent
Definition
SCR_PingEffectsEditorUIComponent.c:2
SCR_PingEffectsEditorUIComponent::m_fPingBorderAnimationSpeed
float m_fPingBorderAnimationSpeed
Definition
SCR_PingEffectsEditorUIComponent.c:10
SCR_PingEffectsEditorUIComponent::m_fPulsateAnimationSpeed
float m_fPulsateAnimationSpeed
Definition
SCR_PingEffectsEditorUIComponent.c:13
SCR_PingEffectsEditorUIComponent::m_sPulseWidgetName
string m_sPulseWidgetName
Definition
SCR_PingEffectsEditorUIComponent.c:7
SCR_PingEffectsEditorUIComponent::HandlerAttached
override void HandlerAttached(Widget w)
Definition
SCR_PingEffectsEditorUIComponent.c:26
SCR_PingEffectsEditorUIComponent::m_sPingBorderName
string m_sPingBorderName
Definition
SCR_PingEffectsEditorUIComponent.c:4
SCR_PingEffectsEditorUIComponent::m_Root
Widget m_Root
Definition
SCR_PingEffectsEditorUIComponent.c:18
SCR_PingEffectsEditorUIComponent::FadeOut
void FadeOut()
Definition
SCR_PingEffectsEditorUIComponent.c:55
SCR_PingEffectsEditorUIComponent::HandlerDeattached
override void HandlerDeattached(Widget w)
Definition
SCR_PingEffectsEditorUIComponent.c:62
SCR_PingEffectsEditorUIComponent::m_bWaitingForFade
bool m_bWaitingForFade
Definition
SCR_PingEffectsEditorUIComponent.c:21
SCR_PingEffectsEditorUIComponent::m_iFadeOutDelaySeconds
int m_iFadeOutDelaySeconds
Definition
SCR_PingEffectsEditorUIComponent.c:16
ScriptedWidgetComponent
Definition
ScriptedWidgetComponent.c:13
Widget
Definition
Widget.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Editor
UI
Components
Common
SCR_PingEffectsEditorUIComponent.c
Generated by
1.17.0