Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_EditorModeRadialEntry.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
2 class SCR_EditorModeRadialEntry : ScriptedSelectionMenuEntry
3 {
4  private SCR_EditorModeEntity m_EditorModeEntity;
5  private SCR_EditorManagerEntity m_EditorManagerEntity;
6 
8  override void OnPerform(IEntity user, BaseSelectionMenu sourceMenu)
9  {
10  super.OnPerform(user, sourceMenu);
11  m_EditorManagerEntity.SetCurrentMode(m_EditorModeEntity.GetModeType());
12  }
13 
15  override bool CanBeShownScript(IEntity user, BaseSelectionMenu sourceMenu)
16  {
17  // Only contains entries that are always shown
18  return true;
19  }
20 
22  override bool CanBePerformedScript(IEntity user, BaseSelectionMenu sourceMenu)
23  {
24  return true;
25  }
26 
29  override bool GetEntryNameScript(out string outName)
30  {
31  SCR_UIInfo modeInfo = m_EditorModeEntity.GetInfo();
32  if (modeInfo) outName = modeInfo.GetName();
33  return true;
34  }
35 
38  override bool GetEntryDescriptionScript(out string outDescription)
39  {
40  outDescription = string.Empty;
41  return false;
42  }
43 
46  override bool GetEntryIconPathScript(out string outIconPath)
47  {
48  SCR_UIInfo modeInfo = m_EditorModeEntity.GetInfo();
49  if (modeInfo) outIconPath = modeInfo.GetIconPath();
50  return true;
51  }
52 
53  void SCR_EditorModeRadialEntry(SCR_EditorModeEntity editorModeEntity, SCR_EditorManagerEntity editorManager)
54  {
55  m_EditorModeEntity = editorModeEntity;
56  m_EditorManagerEntity = editorManager;
57  }
58 }
SCR_EditorModeEntity
Definition: SCR_EditorModeEntity.c:22
m_EditorManagerEntity
protected SCR_EditorManagerEntity m_EditorManagerEntity
Definition: SCR_NotificationsLogUIComponent.c:30
SCR_UIInfo
Definition: SCR_UIInfo.c:7
SCR_EditorModeRadialEntry
Definition: SCR_EditorModeRadialEntry.c:2
BaseSelectionMenu
Definition: BaseSelectionMenu.c:12
m_EditorModeEntity
private SCR_EditorModeEntity m_EditorModeEntity
Definition: SCR_CampaignBuildingCompositionComponent.c:17
SCR_EditorManagerEntity
Definition: SCR_EditorManagerEntity.c:26