Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_RadialMenuGameModeComponent.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/UI/RadialMenu", description: "Common radial menu.")]
2 class SCR_RadialMenuGameModeComponentClass : ScriptComponentClass
3 {
4 }
5 
6 class SCR_RadialMenuGameModeComponent : ScriptComponent
7 {
8  [Attribute()]
9  protected ref SCR_RadialMenu m_Menu;
10 
11  //------------------------------------------------------------------------------------------------
14  void Update(float timeSlice)
15  {
16  if (System.IsConsoleApp())
17  return;
18 
19  if (!m_Menu)
20  {
21  Print("[SCR_RadialMenuGameModeComponent] - Radial menu not assigned! Can't update!", LogLevel.WARNING);
22  return;
23  }
24 
25  m_Menu.Update(timeSlice);
26  }
27 
28  //------------------------------------------------------------------------------------------------
29  override void OnPostInit(IEntity owner)
30  {
32  }
33 
34  override void OnDelete(IEntity owner)
35  {
37  }
38 
39  //------------------------------------------------------------------------------------------------
42  {
43  return m_Menu;
44  }
45 
46  protected void ConnectToRadialMenuSystem()
47  {
48  World world = GetOwner().GetWorld();
49  RadialMenuSystem updateSystem = RadialMenuSystem.Cast(world.FindSystem(RadialMenuSystem));
50  if (!updateSystem)
51  return;
52 
53  updateSystem.Register(this);
54  }
55 
57  {
58  World world = GetOwner().GetWorld();
59  RadialMenuSystem updateSystem = RadialMenuSystem.Cast(world.FindSystem(RadialMenuSystem));
60  if (!updateSystem)
61  return;
62 
63  updateSystem.Unregister(this);
64  }
65 }
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
ScriptComponent
SCR_SiteSlotEntityClass ScriptComponent
OnDelete
override void OnDelete(IEntity owner)
Definition: SCR_RadialMenuGameModeComponent.c:34
SCR_RadialMenuGameModeComponentClass
Definition: SCR_RadialMenuGameModeComponent.c:2
Update
void Update(float timeSlice)
Definition: SCR_RadialMenuGameModeComponent.c:14
GetMenu
SCR_RadialMenu GetMenu()
Definition: SCR_RadialMenuGameModeComponent.c:41
ConnectToRadialMenuSystem
protected void ConnectToRadialMenuSystem()
Definition: SCR_RadialMenuGameModeComponent.c:46
Attribute
SCR_RadialMenuGameModeComponentClass ScriptComponentClass Attribute()] protected ref SCR_RadialMenu m_Menu
Post-process effect of scripted camera.
OnPostInit
override void OnPostInit(IEntity owner)
Editable Mine.
Definition: SCR_RadialMenuGameModeComponent.c:29
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
DisconnectFromRadialMenuSystem
protected void DisconnectFromRadialMenuSystem()
Definition: SCR_RadialMenuGameModeComponent.c:56
SCR_RadialMenu
Definition: SCR_RadialMenu.c:8
RadialMenuSystem
Definition: RadialMenuSystem.c:1
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180