Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_RadialMenuGameModeComponent.c
Go to the documentation of this file.
1[EntityEditorProps(category: "GameScripted/UI/RadialMenu", description: "Common radial menu.")]
5
6class SCR_RadialMenuGameModeComponent : ScriptComponent
7{
8 [Attribute()]
9 protected ref SCR_RadialMenu m_Menu;
10
11 //------------------------------------------------------------------------------------------------
14 void Update(float timeSlice)
15 {
16 if (!m_Menu)
17 {
18 Print("[SCR_RadialMenuGameModeComponent] - Radial menu not assigned! Can't update!", LogLevel.WARNING);
19 return;
20 }
21
22 m_Menu.Update(timeSlice);
23 }
24
25 //------------------------------------------------------------------------------------------------
26 override void OnPostInit(IEntity owner)
27 {
29 }
30
31 override void OnDelete(IEntity owner)
32 {
34 }
35
36 //------------------------------------------------------------------------------------------------
39 {
40 return m_Menu;
41 }
42
44 {
45 World world = GetOwner().GetWorld();
46 RadialMenuSystem updateSystem = RadialMenuSystem.Cast(world.FindSystem(RadialMenuSystem));
47 if (!updateSystem)
48 return;
49
50 updateSystem.Register(this);
51 }
52
54 {
55 World world = GetOwner().GetWorld();
56 RadialMenuSystem updateSystem = RadialMenuSystem.Cast(world.FindSystem(RadialMenuSystem));
57 if (!updateSystem)
58 return;
59
60 updateSystem.Unregister(this);
61 }
62}
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
SCR_RadialMenu GetMenu()
void ConnectToRadialMenuSystem()
void DisconnectFromRadialMenuSystem()
proto external BaseWorld GetWorld()
void Register(SCR_RadialMenuGameModeComponent component)
void Unregister(SCR_RadialMenuGameModeComponent component)
override void Update(float timeSlice)
proto external GenericEntity GetOwner()
Get owner entity.
Definition World.c:16
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
SCR_FieldOfViewSettings Attribute