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_CharacterComponent.c
Go to the documentation of this file.
1
class
SCR_CharacterUIComponent
:
ScriptedWidgetComponent
2
{
3
[
Attribute
(
"0"
, uiwidget:
UIWidgets
.EditBox)]
4
protected
float
m_fArrowRotation
;
5
6
[
Attribute
(
"0"
, uiwidget:
UIWidgets
.SearchComboBox, enumType:
SCR_ECharacterTypeUI
)]
7
protected
SCR_ECharacterTypeUI
m_eCharacterTypes
;
8
9
[
Attribute
(
"1.0 1.0 1.0 1.0"
, uiwidget:
UIWidgets
.ColorPicker)]
10
protected
ref
Color
m_CharacterColor
;
11
12
[
Attribute
(
"IconCharType"
, uiwidget:
UIWidgets
.EditBox,
"Name of the image widget, that holds character type icon"
)]
13
protected
string
m_sIconCharType
;
14
15
[
Attribute
(
"Arrow-Texture"
, uiwidget:
UIWidgets
.EditBox,
"Name of the image widget, that holds arrow texture"
)]
16
protected
string
m_sIconArrowTexture
;
17
18
[
Attribute
(
"CharacterOverlay"
, uiwidget:
UIWidgets
.EditBox,
"Name of the Overlay widget that holds color value"
)]
19
protected
string
m_sCharacterOverlay
;
20
21
[
Attribute
(
"{789DC92AF28E0AB1}UI/Imagesets/Characters/CharacterWrapperUI.imageset"
,
"Imageset source for Character Type"
)]
22
protected
ResourceName
m_sCharTypeImageset
;
23
24
protected
ref array<string>
m_aTypes
= {
"AntiTank"
,
"CrewCommander"
,
"CrewMan"
,
"Driver"
,
"Engineer"
,
"Grenadier"
,
"HeliCrew"
,
"HeliPilot"
,
"Machinegunner"
,
"Medic"
,
"MortarCrew"
,
"Officer"
,
"Outline"
,
"PlatoonLeader"
,
"PlattonSergeant"
,
"RadioOperator"
,
"Rifleman"
,
"Sapper"
,
"Scout"
,
"ScoutRadioOperator"
,
"Sharpshooter"
,
"SpecialForces"
};
25
26
override
void
HandlerAttached
(
Widget
w)
27
{
28
//Casting Widget types
29
ImageWidget
m_wIconCharType =
ImageWidget
.Cast(w.FindAnyWidget(
m_sIconCharType
));
30
ImageWidget
m_wArrowWidget =
ImageWidget
.Cast(w.FindAnyWidget(
m_sIconArrowTexture
));
31
OverlayWidget
m_wCharacterOverlay =
OverlayWidget
.Cast(w.FindAnyWidget(
m_sCharacterOverlay
));
32
33
SetCharTypeTexture
(m_wIconCharType,
m_aTypes
);
34
SetArrowRotation
(m_wArrowWidget);
35
SetCharacterColor
(m_wCharacterOverlay);
36
}
37
42
//------------------------------------------------------------------------------------------------
43
SCR_ECharacterTypeUI
GetCharacterTypes
()
44
{
45
return
m_eCharacterTypes
;
46
}
47
52
//------------------------------------------------------------------------------------------------
53
void
SetIdentity
(
SCR_ECharacterTypeUI
characterTypes)
54
{
55
m_eCharacterTypes
= characterTypes;
56
}
57
62
//------------------------------------------------------------------------------------------------
63
float
GetRotationFloat
()
64
{
65
return
m_fArrowRotation
;
66
}
67
72
//------------------------------------------------------------------------------------------------
73
void
SetRotation
(
float
arrowRotation)
74
{
75
m_fArrowRotation
= arrowRotation;
76
}
77
82
//------------------------------------------------------------------------------------------------
83
Color
GetColor
()
84
{
85
return
m_CharacterColor
;
86
}
87
92
//------------------------------------------------------------------------------------------------
93
void
SetColor
(
Color
characterColor)
94
{
95
m_CharacterColor
= characterColor;
96
}
97
103
//------------------------------------------------------------------------------------------------
104
void
SetCharTypeTexture
(
ImageWidget
characterTypeIcon, array<string> typeArray)
105
{
106
characterTypeIcon.LoadImageFromSet(0,
m_sCharTypeImageset
, typeArray[
m_eCharacterTypes
]);
107
}
108
113
//------------------------------------------------------------------------------------------------
114
void
SetArrowRotation
(
ImageWidget
arrowWidget)
115
{
116
arrowWidget.SetRotation(
m_fArrowRotation
);
117
}
118
123
//------------------------------------------------------------------------------------------------
124
void
SetCharacterColor
(
OverlayWidget
characterOverlay)
125
{
126
characterOverlay.SetColor(
m_CharacterColor
);
127
}
128
}
SCR_ECharacterTypeUI
SCR_ECharacterTypeUI
Definition
SCR_CharacterTypes.c:3
Color
Definition
Color.c:13
ImageWidget
Definition
ImageWidget.c:13
OverlayWidget
Definition
OverlayWidget.c:16
ResourceName
Definition
ResourceName.c:13
SCR_CharacterUIComponent
Definition
SCR_CharacterComponent.c:2
SCR_CharacterUIComponent::m_fArrowRotation
float m_fArrowRotation
Definition
SCR_CharacterComponent.c:4
SCR_CharacterUIComponent::SetCharacterColor
void SetCharacterColor(OverlayWidget characterOverlay)
Definition
SCR_CharacterComponent.c:124
SCR_CharacterUIComponent::HandlerAttached
override void HandlerAttached(Widget w)
Definition
SCR_CharacterComponent.c:26
SCR_CharacterUIComponent::m_eCharacterTypes
SCR_ECharacterTypeUI m_eCharacterTypes
Definition
SCR_CharacterComponent.c:7
SCR_CharacterUIComponent::m_CharacterColor
ref Color m_CharacterColor
Definition
SCR_CharacterComponent.c:10
SCR_CharacterUIComponent::GetCharacterTypes
SCR_ECharacterTypeUI GetCharacterTypes()
Definition
SCR_CharacterComponent.c:43
SCR_CharacterUIComponent::SetRotation
void SetRotation(float arrowRotation)
Definition
SCR_CharacterComponent.c:73
SCR_CharacterUIComponent::SetColor
void SetColor(Color characterColor)
Definition
SCR_CharacterComponent.c:93
SCR_CharacterUIComponent::m_sIconCharType
string m_sIconCharType
Definition
SCR_CharacterComponent.c:13
SCR_CharacterUIComponent::m_sIconArrowTexture
string m_sIconArrowTexture
Definition
SCR_CharacterComponent.c:16
SCR_CharacterUIComponent::m_sCharacterOverlay
string m_sCharacterOverlay
Definition
SCR_CharacterComponent.c:19
SCR_CharacterUIComponent::m_aTypes
ref array< string > m_aTypes
Definition
SCR_CharacterComponent.c:24
SCR_CharacterUIComponent::SetCharTypeTexture
void SetCharTypeTexture(ImageWidget characterTypeIcon, array< string > typeArray)
Definition
SCR_CharacterComponent.c:104
SCR_CharacterUIComponent::GetRotationFloat
float GetRotationFloat()
Definition
SCR_CharacterComponent.c:63
SCR_CharacterUIComponent::SetArrowRotation
void SetArrowRotation(ImageWidget arrowWidget)
Definition
SCR_CharacterComponent.c:114
SCR_CharacterUIComponent::GetColor
Color GetColor()
Definition
SCR_CharacterComponent.c:83
SCR_CharacterUIComponent::SetIdentity
void SetIdentity(SCR_ECharacterTypeUI characterTypes)
Definition
SCR_CharacterComponent.c:53
SCR_CharacterUIComponent::m_sCharTypeImageset
ResourceName m_sCharTypeImageset
Definition
SCR_CharacterComponent.c:22
ScriptedWidgetComponent
Definition
ScriptedWidgetComponent.c:13
UIWidgets
Definition
attributes.c:40
Widget
Definition
Widget.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
UI
Characters
SCR_CharacterComponent.c
Generated by
1.17.0