Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AnalogGaugeMultiSignal.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
4 {
5  // Attributes: signal prefix
6  [Attribute("", UIWidgets.EditBox, "Name of the signals prefix to listen to.")]
7  protected string m_sSignalNamePrefix;
8 
9  // Attributes: number of signals ( signal prefix + signal number = signal name )
10  [Attribute( defvalue: "2", uiwidget: UIWidgets.EditBox, desc: "Number of signals which values are supposed to be summed up" )]
11  private int m_iNrOfSignals;
12 
13  private ref array<int> m_iArraysOfSignalsIDs;
14 
15  //------------------------------------------------------------------------------------------------
16  override float GetValue()
17  {
19  return 0;
20 
21  float value = 0;
22 
23  for( int iLoop = 0; iLoop < m_iArraysOfSignalsIDs.Count(); iLoop++)
24  value += m_SignalsManagerComponent.GetSignalValue( m_iArraysOfSignalsIDs.Get( iLoop ) );
25 
26  return value;
27  }
28 
29  //------------------------------------------------------------------------------------------------
30  override event void DisplayStartDraw(IEntity owner)
31  {
33  return;
34 
35  m_iArraysOfSignalsIDs.Clear();
36  for( int iLoop = 1; iLoop <= m_iNrOfSignals; iLoop++)
37  m_iArraysOfSignalsIDs.Insert( m_SignalsManagerComponent.FindSignal( m_sSignalNamePrefix + iLoop.ToString() ) );
38 
39  super.DisplayStartDraw( owner );
40  }
41 
42  //------------------------------------------------------------------------------------------------
44  {
45  m_iArraysOfSignalsIDs = new array<int>();
46  }
47 
48  //------------------------------------------------------------------------------------------------
50  {
51  if( m_iArraysOfSignalsIDs )
52  m_iArraysOfSignalsIDs = null;
53  }
54 
55 };
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_AnalogGaugeSmall
Definition: SCR_AnalogGaugeSmall.c:2
m_SignalsManagerComponent
protected SignalsManagerComponent m_SignalsManagerComponent
Definition: SCR_SignalsDebugComponent.c:22
SCR_AnalogGaugeMultiSignal
gauge showing the sum of more than one signal
Definition: SCR_AnalogGaugeMultiSignal.c:3