Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_LoadingSpinner.c
Go to the documentation of this file.
2{
3 [Attribute("0.5", desc: "Rotations per seconds")]
4 protected float m_fSpeed;
5
6 protected Widget m_wRoot;
7 protected ImageWidget m_wMap;
10
11 //---------------------------------------------------------------------------------------------
12 override protected void HandlerAttached(Widget w)
13 {
14 m_wRoot = w;
15
16 m_wMap = ImageWidget.Cast(w.FindAnyWidget("Map"));
17 m_wRadar = ImageWidget.Cast(w.FindAnyWidget("Radar"));
18 m_wTargets = ImageWidget.Cast(w.FindAnyWidget("Targets"));
19 }
20
21 //---------------------------------------------------------------------------------------------
22 void Update(float deltaTime)
23 {
24 ProgressMask(m_wTargets, deltaTime, m_fSpeed);
25 RotateImage(m_wRadar, deltaTime, m_fSpeed);
26 }
27
28 //---------------------------------------------------------------------------------------------
29 void ProgressMask(ImageWidget w, float timeSlice, float speed)
30 {
31 float maskProgress = w.GetMaskProgress() + speed * timeSlice;
32 if (maskProgress > 1)
33 maskProgress -= 1;
34
35 w.SetMaskProgress(maskProgress);
36 }
37
38 //---------------------------------------------------------------------------------------------
39 void RotateImage(ImageWidget w, float timeSlice, float speed)
40 {
41 float rotation = w.GetRotation() + (speed * timeSlice * 360);
42 if (rotation > 360)
43 rotation -= 360;
44
45 w.SetRotation(rotation);
46 }
47};
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void ProgressMask(ImageWidget w, float timeSlice, float speed)
void HandlerAttached(Widget w)
void RotateImage(ImageWidget w, float timeSlice, float speed)
void Update(float deltaTime)
SCR_FieldOfViewSettings Attribute
RespawnSystemComponentClass GameComponentClass vector vector rotation