6 [
Attribute(
"#AR-MapMarker_CustomHint",
desc:
"Description in selection menu")]
7 protected string m_sMenuDescription;
9 [
Attribute(
"{3262679C50EF4F01}UI/Textures/Icons/icons_wrapperUI.imageset", UIWidgets.ResourcePickerThumbnail,
desc:
"Imageset resource",
params:
"imageset")]
10 protected ResourceName m_sMenuImageset;
13 protected string m_sMenuIcon;
15 [
Attribute(
"", UIWidgets.Object,
"Categories of marker icons for sorting")]
16 protected ref array<ref SCR_MarkerIconCategory> m_aPlacedMarkerIconCategories;
18 [
Attribute(
"", UIWidgets.Object,
"Icons which can be chosen when placing a custom marker")]
19 protected ref array<ref SCR_MarkerIconEntry> m_aPlacedMarkerIcons;
21 [
Attribute(
"", UIWidgets.Object,
"Colors which can be chosen when placing a custom marker")]
22 protected ref array<ref SCR_MarkerColorEntry> m_aPlacedMarkerColors;
25 string GetMenuDescription()
31 ResourceName GetMenuImageset()
43 Color GetColorEntry(
int i)
46 return Color.FromInt(Color.WHITE);
52 bool GetIconEntry(
int i, out ResourceName imageset, out ResourceName imagesetGlow, out
string imageQuad)
63 int GetIconCategoryID(
int iconID)
72 if (identifier ==
category.m_sIdentifier)
80 array<ref SCR_MarkerColorEntry> GetColorEntries()
86 array<ref SCR_MarkerIconEntry> GetIconEntries()
92 array<ref SCR_MarkerIconCategory> GetIconCategories()
106 super.InitClientSettings(marker, widgetComp);
108 ResourceName imageset, imagesetGlow;
110 GetIconEntry(marker.GetIconEntry(), imageset, imagesetGlow, quad);
111 widgetComp.SetImage(imageset, quad);
112 widgetComp.SetText(marker.GetCustomText());
113 widgetComp.SetColor(GetColorEntry(marker.GetColorEntry()));
115 widgetComp.SetGlowImage(imagesetGlow, quad);
117 widgetComp.SetEventListening(
true);
125 widgetComp.SetTextVisible(
false);
129 widgetComp.SetTextVisible(
true);
137 class SCR_MarkerColorEntry
145 return Color.FromInt(
m_Color.PackToInt());
155 [
Attribute(
"",
desc:
"Set this wihin the icon to link it to this category")]
156 string m_sIdentifier;
165 class SCR_MarkerIconEntry
167 [
Attribute(
"general",
desc:
"Category tab within marker dialog")]
168 string m_sCategoryIdentifier;
170 [
Attribute(
"{E23427CAC80DA8B7}UI/Textures/Icons/icons_mapMarkersUI.imageset", UIWidgets.ResourcePickerThumbnail,
desc:
"Image resource",
params:
"imageset")]
171 protected ResourceName m_sIconImageset;
173 [
Attribute(
"{67B3A6DC2D712B52}UI/Textures/Icons/icons_mapMarkersUI-glow.imageset", UIWidgets.ResourcePickerThumbnail,
desc:
"Image resource",
params:
"imageset")]
174 protected ResourceName m_sIconGlowImageset;
177 protected string m_sIconImagesetQuad;
180 void GetIconResource(out ResourceName imageset, out ResourceName imagesetGlow, out
string imageQuad)
182 imageset = m_sIconImageset;
183 imagesetGlow = m_sIconGlowImageset;
184 imageQuad = m_sIconImagesetQuad;
192 override bool _WB_GetCustomTitle(BaseContainer source, out
string title)
194 typename tName = source.GetClassName().ToType();
197 title = source.GetClassName() +
": " +
typename.EnumToString(
SCR_EMapMarkerType, cfg.GetMarkerType());
209 string quad, identifier;
210 source.Get(
"m_sCategoryIdentifier", identifier);
211 source.Get(
"m_sIconImagesetQuad", quad);
213 title = identifier +
": " + quad;