Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_BaseToggleToolbarAction.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
4{
5 [Attribute(desc: "When defined, this info will be used when the action is toggled on.")]
6 protected ref SCR_UIInfo m_InfoToggled;
7
9
10 protected int m_iCurrentValue = -1;
11 protected bool m_bCurrentHighlight = false;
12
20
25 protected void Toggle(int value, bool highlight = false)
26 {
27 if (value == m_iCurrentValue && highlight == m_bCurrentHighlight)
28 return;
29
30 m_iCurrentValue = value;
31 m_bCurrentHighlight = highlight;
32 m_OnToggleChanged.Invoke(value, highlight);
33 }
34
37 {
38 return m_iCurrentValue;
39 }
40
43 {
45 }
46
52 void Track()
53 {
54 }
55
61 void Untrack()
62 {
63 }
64
65 /*
66 Get UI info representing toggled state of the action.
67 When not defined, default UI info will be returned.
68 \return UI info
69 */
71 {
72 if (m_InfoToggled)
73 return m_InfoToggled;
74 else
75 return GetInfo();
76 }
77}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_ArsenalGameModeUIDataHolder SCR_BaseContainerCustomTitleUIInfo("m_UIInfo")
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void Toggle(int value, bool highlight=false)
SCR_FieldOfViewSettings Attribute
ScriptInvokerBase< func > ScriptInvoker
Definition tools.c:134