Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_LoadingCircleComponent.c
Go to the documentation of this file.
1// Component for simple loading circle widget with endless spining
2
3//---- REFACTOR NOTE START: This code will need to be refactored as current implementation is not conforming to the standards ----
4// Non interactable component that inherits from the base of interactable components, and thus includes needless settings for clicking and sounds
5
6//------------------------------------------------------------------------------------------------
8{
9 const string WIDGET_IMAGE = "Image";
10
11 [Attribute("1", UIWidgets.CheckBox, "Speed of rotation")]
12 protected float m_fSpeed;
13
14 protected bool m_bIsPlayingAnimation;
15 protected bool m_bIsAnimationDone;
16
19
20 //------------------------------------------------------------------------------------------------
21 override void HandlerAttached(Widget w)
22 {
23 super.HandlerAttached(w);
24
25 m_wRoot = w;
26
28 m_wImage = ImageWidget.Cast(m_wRoot.FindAnyWidget(WIDGET_IMAGE));
29
31 m_bIsAnimationDone = true;
32
33 Animate();
34 }
35
36 //------------------------------------------------------------------------------------------------
37 protected void Animate()
38 {
39 if (!m_wImage)
40 return;
41
42 m_wImage.SetRotation(0);
44 if (anim)
45 anim.GetOnCompleted().Insert(Animate);
46 }
47
48 //------------------------------------------------------------------------------------------------
50 {
51
52 }
53
54 //------------------------------------------------------------------------------------------------
56 {
57
58 }
59
60 // API
61 //------------------------------------------------------------------------------------------------
62 void SetSpeed(float speed) { m_fSpeed = speed; }
63
64 //------------------------------------------------------------------------------------------------
65 float GetSpeed() { return m_fSpeed; }
66
67 //------------------------------------------------------------------------------------------------
68 void GetIsPlayingAnimation(bool playing) { m_bIsPlayingAnimation = playing; }
69
70 //------------------------------------------------------------------------------------------------
72};
73
74//---- REFACTOR NOTE END ----
void WidgetAnimationBase(Widget w, float speed)
static WidgetAnimationImageRotation Rotation(Widget widget, float targetValue, float speed)
override void HandlerAttached(Widget w)
Base class for all final Reforger interactive elements.
SCR_FieldOfViewSettings Attribute