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_CustomArrayEditableEntityUIComponent.c
Go to the documentation of this file.
1
class
SCR_CustomArrayEditableEntityUIComponent
:
SCR_BaseEditableEntityUIComponent
2
{
3
[
Attribute
(
desc
:
"Image widget to set icon same as EditableEntity UI info icon"
)]
4
protected
ref array<string>
m_sIconWidgetNames
;
5
6
[
Attribute
(
"0"
,
desc
:
"If true will attempt to color the widget this script is attached to if the EditableEntity uses SCR_ColorUIInfo"
)]
7
protected
bool
m_bColorWidget
;
8
9
//------------------------------------------------------------------------------------------------
10
override
void
OnInit
(
SCR_EditableEntityComponent
entity,
SCR_UIInfo
info,
SCR_EditableEntityBaseSlotUIComponent
slot)
11
{
12
//~ Set custom textures
13
if
(info)
14
{
15
ImageWidget
iconWidget;
16
17
//~ Set Icons
18
if
(
m_sIconWidgetNames
)
19
{
20
foreach
(
string
icon :
m_sIconWidgetNames
)
21
{
22
iconWidget =
ImageWidget
.Cast(
GetWidget
().FindAnyWidget(icon));
23
info.
SetIconTo
(iconWidget);
24
}
25
}
26
27
//~ Color widget
28
if
(
m_bColorWidget
)
29
{
30
SCR_ColorUIInfo
colorInfo =
SCR_ColorUIInfo
.Cast(info);
31
32
if
(colorInfo)
33
GetWidget
().SetColor(colorInfo.
GetColor
());
34
else
35
Print
(
"'SCR_CustomArrayEditableEntityUIComponent' tried to set the UI color but the EditableEntity is not using SCR_ColorUIInfo"
,
LogLevel
.WARNING);
36
}
37
}
38
}
39
}
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
GetWidget
Widget GetWidget()
Definition
SCR_VonDisplay.c:162
ImageWidget
Definition
ImageWidget.c:13
SCR_BaseEditableEntityUIComponent
Definition
SCR_BaseEditableEntityUIComponent.c:9
SCR_ColorUIInfo
Definition
SCR_ColorUIInfo.c:3
SCR_ColorUIInfo::GetColor
Color GetColor()
Definition
SCR_ColorUIInfo.c:10
SCR_CustomArrayEditableEntityUIComponent
Definition
SCR_CustomArrayEditableEntityUIComponent.c:2
SCR_CustomArrayEditableEntityUIComponent::m_sIconWidgetNames
ref array< string > m_sIconWidgetNames
Definition
SCR_CustomArrayEditableEntityUIComponent.c:4
SCR_CustomArrayEditableEntityUIComponent::m_bColorWidget
bool m_bColorWidget
Definition
SCR_CustomArrayEditableEntityUIComponent.c:7
SCR_CustomArrayEditableEntityUIComponent::OnInit
override void OnInit(SCR_EditableEntityComponent entity, SCR_UIInfo info, SCR_EditableEntityBaseSlotUIComponent slot)
Definition
SCR_CustomArrayEditableEntityUIComponent.c:10
SCR_EditableEntityBaseSlotUIComponent
Definition
SCR_EditableEntityBaseSlotUIComponent.c:7
SCR_EditableEntityComponent
Definition
SCR_EditableEntityComponent.c:14
SCR_UIInfo
Definition
SCR_UIInfo.c:8
SCR_UIInfo::SetIconTo
bool SetIconTo(ImageWidget imageWidget)
Definition
SCR_UIInfo.c:102
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Editor
UI
Components
EditableEntities
SCR_CustomArrayEditableEntityUIComponent.c
Generated by
1.17.0