Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_AnalogGaugeUni.c
Go to the documentation of this file.
1
// Signal based analog gauge, used for re-fuel mechanic prototype - shows delta between initial state (when displayed) and current state
2
class
SCR_AnalogGaugeUni
:
SCR_AnalogGauge
3
{
4
[
Attribute
(
"0"
,
UIWidgets
.CheckBox,
"Show difference of value"
)]
5
protected
bool
m_bShowValueDiff
;
6
7
private
TextWidget
m_wInfoText2;
8
9
private
IEntity
m_Owner;
10
private
bool
m_bGaugeShown;
11
private
float
m_fLastValue = 0.0;
12
13
bool
IsGaugeShown()
14
{
15
return
m_bGaugeShown;
16
};
17
18
void
EnableHUD
(
bool
enable )
19
{
20
if
( enable )
21
{
22
DisplayStartDraw
(
m_Owner
);
23
m_bGaugeShown =
true
;
24
}
25
else
26
{
27
DisplayStopDraw
( m_Owner );
28
m_bGaugeShown =
false
;
29
}
30
}
31
32
//------------------------------------------------------------------------------------------------
33
override
void
CreateGauge(
IEntity
owner, out
bool
bSuccess)
34
{
35
super.CreateGauge( owner, bSuccess);
36
37
m_wInfoText2 = TextWidget.Cast(
m_wRoot
.FindAnyWidget(
"InfoText2"
));
38
m_wInfoText2.SetVisible(
true
);
39
m_wInfoText2.SetText(
"0"
);
40
}
41
42
//------------------------------------------------------------------------------------------------
43
override
void
UpdateGauge(
IEntity
owner,
float
timeSlice,
float
value)
44
{
45
super.UpdateGauge(owner, timeSlice, value);
46
47
if
(m_fLastValue == 0)
48
m_fLastValue = value;
49
50
value = Math.Round(m_fLastValue - value);
51
m_wInfoText2.SetText(value.ToString());
52
}
53
};
m_Owner
IEntity m_Owner
Definition
SCR_CampaignServiceCompositionComponent.c:18
m_wRoot
Widget m_wRoot
Definition
SCR_GameModeCleanSweep.c:25
IEntity
enum EVehicleType IEntity
IEntity
Definition
IEntity.c:13
SCR_AnalogGauge
Definition
SCR_AnalogGauge.c:3
SCR_AnalogGauge::DisplayStartDraw
override event void DisplayStartDraw(IEntity owner)
Definition
SCR_AnalogGauge.c:150
SCR_AnalogGaugeUni
Definition
SCR_AnalogGaugeUni.c:3
SCR_AnalogGaugeUni::m_bShowValueDiff
bool m_bShowValueDiff
Definition
SCR_AnalogGaugeUni.c:5
SCR_BaseAnalogGauge::DisplayStopDraw
override void DisplayStopDraw(IEntity owner)
Definition
SCR_BaseAnalogGauge.c:355
TextWidget
Definition
TextWidget.c:16
UIWidgets
Definition
attributes.c:40
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
EnableHUD
proto external bool EnableHUD(bool state)
scripts
Game
UI
HUD
VehicleInfo
SCR_AnalogGaugeUni.c
Generated by
1.17.0