Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_EditorModeRadialEntry.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
2class 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}
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
ResourceName GetIconPath()
Definition SCR_UIInfo.c:20
static SCR_UIInfo GetInfo(BaseContainer source, string varName)
Definition SCR_UIInfo.c:133