Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_VONEntryComponent.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
2// Attached to layout used for radial menu VON entries
4{
11
12 //------------------------------------------------------------------------------------------------
13 void SetPowerIcon(bool state)
14 {
15 if (state)
16 m_wPowerIcon.SetColor(Color.FromInt(Color.GREEN));
17 else
18 m_wPowerIcon.SetColor(Color.FromInt(Color.GRAY));
19 }
20
21 //------------------------------------------------------------------------------------------------
22 void SetActiveIcon(bool state)
23 {
24 if (state)
25 m_wActiveIcon.SetOpacity(1);
26 else
27 m_wActiveIcon.SetOpacity(0);
28 }
29
30 //------------------------------------------------------------------------------------------------
31 void SetMuteIcon(bool state)
32 {
33 if (state)
34 m_wMuteIcon.SetOpacity(1);
35 else
36 m_wMuteIcon.SetOpacity(0);
37 }
38
39 //------------------------------------------------------------------------------------------------
40 void SetTransceiverText(string text)
41 {
42 m_wTransceiverText.SetText(text);
43 }
44
45 //------------------------------------------------------------------------------------------------
46 void SetTransceiverOpacity(float alpha)
47 {
48 m_wTransceiverText.SetOpacity(alpha);
49 }
50
51 //------------------------------------------------------------------------------------------------
52 void SetFrequencyText(string text)
53 {
54 m_wFrequencyText.SetText(text);
55 }
56
57 //------------------------------------------------------------------------------------------------
59 {
60 m_wFrequencyText.SetColor(color);
61 }
62
63 //------------------------------------------------------------------------------------------------
64 void SetChannelText(string text)
65 {
66 if (text == string.Empty)
67 {
68 m_wChannelText.SetOpacity(0);
69 }
70 else
71 {
72 m_wChannelText.SetText(text);
73 m_wChannelText.SetOpacity(1);
74 }
75 }
76
77 //------------------------------------------------------------------------------------------------
78 override void HandlerAttached(Widget w)
79 {
80 super.HandlerAttached(w);
81
82 m_wPowerIcon = ImageWidget.Cast(m_wRoot.FindAnyWidget("PowerIcon"));
83 m_wActiveIcon = ImageWidget.Cast(m_wRoot.FindAnyWidget("ActiveIcon"));
84 m_wMuteIcon = ImageWidget.Cast(m_wRoot.FindAnyWidget("MuteIcon"));
85 m_wTransceiverText = TextWidget.Cast(m_wRoot.FindAnyWidget("TransceiverText"));
86 m_wFrequencyText = TextWidget.Cast(m_wRoot.FindAnyWidget("FrequencyText"));
87 m_wChannelText = TextWidget.Cast(m_wRoot.FindAnyWidget("ChannelText"));
88 }
89};
Definition Color.c:13
TextWidget m_wTransceiverText
TextWidget m_wFrequencyText
void SetFrequencyColor(Color color)
override void HandlerAttached(Widget w)
void SetTransceiverText(string text)
void SetPowerIcon(bool state)
TextWidget m_wChannelText
ImageWidget m_wActiveIcon
void SetChannelText(string text)
ImageWidget m_wPowerIcon
void SetTransceiverOpacity(float alpha)
void SetFrequencyText(string text)
ImageWidget m_wMuteIcon
void SetActiveIcon(bool state)
void SetMuteIcon(bool state)