Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_BaseSelectionMenuDisplay.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
2[BaseContainerProps(configRoot: true)]
4{
6 protected bool m_bIsOpen;
7
10 void SetDefault();
11
13 void SetContent(array<BaseSelectionMenuEntry> allEntries, array<BaseSelectionMenuEntry> disabledEntries);
14
16 void SetSelection(BaseSelectionMenuEntry selectedEntry, vector selectionInput, float selectionAngle, float minInputMagnitude);
17
20
22 void SetOpen(IEntity owner, bool open) { m_bIsOpen = open; }
23};
24
25//------------------------------------------------------------------------------------------------
27{
28 static const string RADIALMENU_ICON_EMPTY = "{74DDB9BCF5A40173}UI/Textures/RadialMenu/RadialMenuEmpty.edds";
29 static const string RADIALMENU_ICON_DEFAULT_WEAPONSWITCHING = "{74753A21981BB84D}UI/Textures/RadialMenu/RadialMenuDefaultWeapon.edds";
30 static const string RADIALMENU_ICON_DEFAULT_AIMESSAGE = "{164112D4DD73C39F}UI/Textures/RadialMenu/RadialMenuDefaultAIMessage.edds";
31
32 //------------------------------------------------------------------------------------------------
34 protected static string GetSafeIconPath(string iconPath)
35 {
36 if (iconPath == string.Empty)
37 return RADIALMENU_ICON_EMPTY;
38
39 return iconPath;
40 }
41
42 //------------------------------------------------------------------------------------------------
45 static string GetDefaultIconPath(Class instance)
46 {
47 auto baseEntry = BaseSelectionMenuEntry.Cast(instance);
48 if (!baseEntry)
49 return RADIALMENU_ICON_EMPTY;
50
51 auto aiMessageEntry = AIMessageSelectionMenuEntry.Cast(instance);
52 if (aiMessageEntry)
53 {
54 return GetSafeIconPath(RADIALMENU_ICON_DEFAULT_AIMESSAGE);
55 }
56
57 return RADIALMENU_ICON_EMPTY;
58 }
59};
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Super root of all classes in Enforce script.
Definition Types.c:35
void SetOpen(IEntity owner, bool open)
Used to set open state.
void SetContent(array< BaseSelectionMenuEntry > allEntries, array< BaseSelectionMenuEntry > disabledEntries)
Used to pass in the radial menu content.
bool m_bIsOpen
Is the menu open, should this display be drawn?
void SetSelection(BaseSelectionMenuEntry selectedEntry)
Generaly Used for setting selected entry.
void SetSelection(BaseSelectionMenuEntry selectedEntry, vector selectionInput, float selectionAngle, float minInputMagnitude)
Used to set selected entry. Can be null as for no selection.
static string GetSafeIconPath(string iconPath)
Returns provided icon path if its valid, or default (empty) icon otherwise.
static string GetDefaultIconPath(Class instance)