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_StatsPanel_ServerName.c
Go to the documentation of this file.
1
class
SCR_StatsPanel_ServerName
:
SCR_StatsPanelBase
2
{
3
protected
string
m_sServerName
;
4
protected
const
float
OPACITY
= 0.5;
5
protected
ServerInfo
m_ServerInfo
=
GetGame
().GetServerInfo();
6
7
//------------------------------------------------------------------------------------------------
8
override
bool
DisplayStartDrawInit
(
IEntity
owner)
9
{
10
super.DisplayStartDrawInit(owner);
11
12
if
(
m_ServerInfo
!= null)
13
m_sServerName
=
m_ServerInfo
.GetName();
14
15
return
!
m_sServerName
.IsEmpty();
16
}
17
18
//------------------------------------------------------------------------------------------------
19
override
void
DisplayStartDraw
(
IEntity
owner)
20
{
21
if
(!
m_wRoot
)
22
return
;
23
24
m_Widgets
=
new
SCR_StatsPanelWidgets
();
25
m_Widgets
.Init(
m_wRoot
);
26
27
Update
(0);
28
29
m_Widgets
.m_wLabel.SetText(
m_sServerName
);
30
}
31
32
//------------------------------------------------------------------------------------------------
33
override
void
DisplayUpdate
(
IEntity
owner,
float
timeSlice)
34
{
35
//~ No need to update as server name is only set once
36
}
37
38
//------------------------------------------------------------------------------------------------
39
override
protected
void
Update
(
float
value)
40
{
41
// Get visialization attributes based on the new state
42
Color
color = GUIColors.DEFAULT;
43
Color
colorGlow = GUIColors.DEFAULT_GLOW;
44
string
icon =
m_sIconOK
;
45
46
// Set global color & opacity
47
m_Widgets
.m_wColorOpacity.SetOpacity(
OPACITY
);
48
m_Widgets
.m_wColorOpacity.SetColor(color);
49
50
// Set icon & glow
51
m_Widgets
.m_wIcon.LoadImageFromSet(0,
UIConstants
.ICONS_IMAGE_SET, icon);
52
m_Widgets
.m_wIconGlow.LoadImageFromSet(0,
UIConstants
.ICONS_GLOW_IMAGE_SET, icon);
53
m_Widgets
.m_wIconGlow.SetColor(colorGlow);
54
55
OverlayWidget
textWidget =
OverlayWidget
.Cast(
m_wRoot
.FindAnyWidget(
"Text"
));
56
textWidget.SetVisible(
false
);
57
}
58
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
m_wRoot
Widget m_wRoot
Definition
SCR_GameModeCleanSweep.c:25
Color
Definition
Color.c:13
IEntity
Definition
IEntity.c:13
OverlayWidget
Definition
OverlayWidget.c:16
SCR_StatsPanel_ServerName
Definition
SCR_StatsPanel_ServerName.c:2
SCR_StatsPanel_ServerName::m_ServerInfo
ServerInfo m_ServerInfo
Definition
SCR_StatsPanel_ServerName.c:5
SCR_StatsPanel_ServerName::DisplayStartDraw
override void DisplayStartDraw(IEntity owner)
Definition
SCR_StatsPanel_ServerName.c:19
SCR_StatsPanel_ServerName::OPACITY
const float OPACITY
Definition
SCR_StatsPanel_ServerName.c:4
SCR_StatsPanel_ServerName::DisplayStartDrawInit
override bool DisplayStartDrawInit(IEntity owner)
Definition
SCR_StatsPanel_ServerName.c:8
SCR_StatsPanel_ServerName::m_sServerName
string m_sServerName
Definition
SCR_StatsPanel_ServerName.c:3
SCR_StatsPanel_ServerName::DisplayUpdate
override void DisplayUpdate(IEntity owner, float timeSlice)
Definition
SCR_StatsPanel_ServerName.c:33
SCR_StatsPanel_ServerName::Update
void Update(float value)
Definition
SCR_StatsPanel_ServerName.c:39
SCR_StatsPanelBase
Definition
SCR_StatsPanelBase.c:19
SCR_StatsPanelBase::m_sIconOK
string m_sIconOK
Definition
SCR_StatsPanelBase.c:33
SCR_StatsPanelBase::m_Widgets
ref SCR_StatsPanelWidgets m_Widgets
Definition
SCR_StatsPanelBase.c:57
SCR_StatsPanelWidgets
Definition
SCR_StatsPanelWidgets.c:5
ServerInfo
Definition
ServerInfo.c:8
UIConstants
Definition
Constants.c:151
Update
@ Update
Definition
SndComponentCallbacks.c:14
scripts
Game
UI
HUD
StatsPanel
SCR_StatsPanel_ServerName.c
Generated by
1.17.0