Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_MapMarkerEntryImageText.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
5{
6 [Attribute("", UIWidgets.Object, "Predefined marker simple entries")]
7 protected ref array<ref SCR_MarkerSimpleConfig> m_aSimpleEntries;
8
9 //------------------------------------------------------------------------------------------------
11 {
12 return SCR_EMapMarkerType.SIMPLE;
13 }
14
15 //------------------------------------------------------------------------------------------------
16 override void InitClientSettings(SCR_MapMarkerBase marker, SCR_MapMarkerWidgetComponent widgetComp, bool skipProfanityFilter = false)
17 {
18 super.InitClientSettings(marker, widgetComp);
19
20 int cfgID = marker.GetMarkerConfigID();
21 if (cfgID >= 0)
22 {
23 foreach (SCR_MarkerSimpleConfig cfg : m_aSimpleEntries)
24 {
25 if (cfg.GetEntryID() == cfgID)
26 {
27 string imgset, icon;
28 cfg.GetIconResource(imgset, icon);
29
30 widgetComp.SetImage(imgset, icon);
31 widgetComp.SetColor(cfg.GetColor());
32 widgetComp.SetText(cfg.GetText());
33 }
34 }
35 }
36 }
37
38}
39
40//------------------------------------------------------------------------------------------------
43class SCR_MarkerSimpleConfig
44{
45 [Attribute("UNNAMED")]
46 protected string m_sName;
47
48 [Attribute("0", desc: "Unique secondary ID (primary is EMarkerType) used to reduce toll on the network during synchronization by loading const data from config")]
49 protected int m_iEntryID;
50
51 [Attribute("{2EFEA2AF1F38E7F0}UI/Textures/Icons/icons_wrapperUI-64.imageset", UIWidgets.ResourcePickerThumbnail, desc: "Image resource", params: "imageset")]
52 protected ResourceName m_sIconImageset;
53
54 [Attribute("", desc: "Imageset quad")]
55 protected string m_sIconImagesetQuad;
56
57 [Attribute("1.0 1.0 1.0 1.0")]
58 protected ref Color m_Color;
59
60 [Attribute("", desc: "Text under the marker icon")]
61 protected string m_sText;
62
63 //------------------------------------------------------------------------------------------------
64 int GetEntryID()
65 {
66 return m_iEntryID;
67 }
68
69 //------------------------------------------------------------------------------------------------
70 void GetIconResource(out ResourceName imageset, out string imageQuad)
71 {
72 imageset = m_sIconImageset;
73 imageQuad = m_sIconImagesetQuad;
74 }
75
76 //------------------------------------------------------------------------------------------------
78 {
79 return Color.FromInt(m_Color.PackToInt());
80 }
81
82 //------------------------------------------------------------------------------------------------
83 string GetText()
84 {
85 return m_sText;
86 }
87
88}
89
90//------------------------------------------------------------------------------------------------
92{
93 //------------------------------------------------------------------------------------------------
94 override bool _WB_GetCustomTitle(BaseContainer source, out string title)
95 {
96 source.Get("m_sName", title);
97
98 return true;
99 }
100}
string GetText()
string m_sIconImagesetQuad
ref Color m_Color
LocalizedString m_sName
SCR_EMapMarkerType
SCR_MapMarkerEntryImageText SCR_MapMarkerEntryConfig SCR_MapMarkerSimpleTitle()] class SCR_MarkerSimpleConfig
SCR_MapMarkerEntryImageText SCR_MapMarkerEntryConfig BaseContainerProps()
Placed marker color entry.
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition Color.c:13
Base entry config.
Basic image & text entry.
override SCR_EMapMarkerType GetMarkerType()
override void InitClientSettings(SCR_MapMarkerBase marker, SCR_MapMarkerWidgetComponent widgetComp, bool skipProfanityFilter=false)
ref array< ref SCR_MarkerSimpleConfig > m_aSimpleEntries
void SetText(string text, bool skipProfanityFilter=false)
void SetImage(ResourceName icon, string quad, float aspectRatio=1)
SCR_FieldOfViewSettings Attribute
string m_sText
Definition EnWidgets.c:82