Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
ScriptedSelectionMenuEntry.c
Go to the documentation of this file.
2{
3 const string LAYOUT_ENTRY_DEFAULT = "{121C45A1F59DC1AF}UI/layouts/Common/RadialMenu/RadialEntryElement.layout";
4
5 // Entry widget
6 protected ResourceName m_EntryLayout = LAYOUT_ENTRY_DEFAULT;
7 protected ref Widget m_wEntry;
8 protected string m_sName;
9
11 override event void OnPerform(IEntity user, BaseSelectionMenu sourceMenu)
12 {
13 #ifdef ENABLE_DIAG
14 if (SCR_BaseSelectionMenu.IsRadialMenuLoggingEnabled())
15 {
16 Print("Radial menu " + sourceMenu + " performed: " + this + "! User: " + user);
17 }
18 #endif
19 }
20
22 override bool CanBeShownScript(IEntity user, BaseSelectionMenu sourceMenu)
23 {
24 return true;
25 }
26
28 override bool CanBePerformedScript(IEntity user, BaseSelectionMenu sourceMenu)
29 {
30 return true;
31 }
32
35 override bool GetEntryNameScript(out string outName)
36 {
37 outName = m_sName;
38 return true;
39 }
40
43 override bool GetEntryDescriptionScript(out string outDescription)
44 {
45 return false;
46 }
47
50 override bool GetEntryIconPathScript(out string outIconPath)
51 {
52 return false;
53 }
54
57 {
58 return null;
59 }
60
61 //------------------------------------------------------------------------------------------------
63 void UpdateVisuals() {}
64
65
66
68
69 //------------------------------------------------------------------------------------------------
71
72 //------------------------------------------------------------------------------------------------
73 void SetEntryLayout(ResourceName entryLayout) { m_EntryLayout = entryLayout; }
74
75 //------------------------------------------------------------------------------------------------
77
78 //------------------------------------------------------------------------------------------------
79 void SetEntryWidget(Widget root) { m_wEntry = root; }
80
81 //------------------------------------------------------------------------------------------------
82 string GetName() { return m_sName; }
83
84 //------------------------------------------------------------------------------------------------
85 void SetName(string name) { m_sName = name; }
86};
Scripted base radial menu implementation.
void SetEntryWidget(Widget root)
void UpdateVisuals()
Base visuals update function for specific entry update.
ResourceName m_EntryLayout
Widget GetEntryWidget()
string GetName()
override event void OnPerform(IEntity user, BaseSelectionMenu sourceMenu)
Callback for when this entry is supposed to be performed.
ref Widget m_wEntry
override bool CanBeShownScript(IEntity user, BaseSelectionMenu sourceMenu)
Can this entry be shown?
override bool GetEntryDescriptionScript(out string outDescription)
string m_sName
override bool GetEntryNameScript(out string outName)
void SetName(string name)
override bool CanBePerformedScript(IEntity user, BaseSelectionMenu sourceMenu)
Can this entry be performed?
override bool GetEntryIconPathScript(out string outIconPath)
void SetEntryLayout(ResourceName entryLayout)
ResourceName GetEntryLayout()
API for entry widget and component.
override UIInfo GetUIInfoScript()
Can be overridden to return desired UIInfo in GetUIInfo method.
UIInfo - allows to define UI elements.
Definition UIInfo.c:14
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.