Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
RadialMenuSystem.c
Go to the documentation of this file.
2{
3 override static void InitInfo(WorldSystemInfo outInfo)
4 {
5 outInfo
6 .SetAbstract(false)
7 .SetUnique(true)
8 .SetLocation(WorldSystemLocation.Client)
9 .AddPoint(ESystemPoint.Frame);
10 }
11
12 protected ref array<SCR_RadialMenuGameModeComponent> m_Components = {};
13
14 override protected void OnUpdatePoint(WorldUpdatePointArgs args)
15 {
16 float timeSlice = args.GetTimeSliceSeconds();
17
18 foreach (SCR_RadialMenuGameModeComponent comp: m_Components)
19 {
20 comp.Update(timeSlice);
21 }
22 }
23
24 override protected void OnDiag(float timeSlice)
25 {
26 DbgUI.Begin("RadialMenuSystem");
27
28 DbgUI.Text("Items: " + m_Components.Count());
29
30 if (DbgUI.Button("Dump active motors components"))
31 {
32 foreach (SCR_RadialMenuGameModeComponent comp: m_Components)
33 {
34 Print(comp.GetOwner(), LogLevel.ERROR);
35 }
36 }
37
38 DbgUI.End();
39 }
40
41 void Register(SCR_RadialMenuGameModeComponent component)
42 {
43 //About to be deleted
44 if (component.GetOwner().IsDeleted() || (component.GetOwner().GetFlags() & EntityFlags.USER5))
45 return;
46
47 if (m_Components.Find(component) != -1)
48 return;
49
50 m_Components.Insert(component);
51 }
52
53 void Unregister(SCR_RadialMenuGameModeComponent component)
54 {
55 int idx = m_Components.Find(component);
56 if (idx == -1)
57 return;
58
59 m_Components.Remove(idx);
60 }
61}
Definition DbgUI.c:66
void OnUpdatePoint(WorldUpdatePointArgs args)
void Register(SCR_RadialMenuGameModeComponent component)
void Unregister(SCR_RadialMenuGameModeComponent component)
ref array< SCR_RadialMenuGameModeComponent > m_Components
void OnDiag(float timeSlice)
Structure holding world system meta-information required by the engine.
Structure holding extra data of WorldSystem update point.
WorldSystemPoint ESystemPoint
Definition gameLib.c:7
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
EntityFlags
Various entity flags.
Definition EntityFlags.c:14
WorldSystemLocation