Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CharacterComponent.c
Go to the documentation of this file.
2{
3 [Attribute("0", uiwidget: UIWidgets.EditBox)]
4 protected float m_fArrowRotation;
5
6 [Attribute("0", uiwidget: UIWidgets.SearchComboBox, enumType: SCR_ECharacterTypeUI)]
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")]
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 //------------------------------------------------------------------------------------------------
47
52 //------------------------------------------------------------------------------------------------
53 void SetIdentity(SCR_ECharacterTypeUI characterTypes)
54 {
55 m_eCharacterTypes = characterTypes;
56 }
57
62 //------------------------------------------------------------------------------------------------
64 {
65 return m_fArrowRotation;
66 }
67
72 //------------------------------------------------------------------------------------------------
73 void SetRotation(float arrowRotation)
74 {
75 m_fArrowRotation = arrowRotation;
76 }
77
82 //------------------------------------------------------------------------------------------------
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 //------------------------------------------------------------------------------------------------
115 {
116 arrowWidget.SetRotation(m_fArrowRotation);
117 }
118
123 //------------------------------------------------------------------------------------------------
124 void SetCharacterColor(OverlayWidget characterOverlay)
125 {
126 characterOverlay.SetColor(m_CharacterColor);
127 }
128}
SCR_ECharacterTypeUI
Definition Color.c:13
void SetCharacterColor(OverlayWidget characterOverlay)
override void HandlerAttached(Widget w)
SCR_ECharacterTypeUI m_eCharacterTypes
SCR_ECharacterTypeUI GetCharacterTypes()
void SetRotation(float arrowRotation)
void SetColor(Color characterColor)
void SetCharTypeTexture(ImageWidget characterTypeIcon, array< string > typeArray)
void SetArrowRotation(ImageWidget arrowWidget)
void SetIdentity(SCR_ECharacterTypeUI characterTypes)
SCR_FieldOfViewSettings Attribute