Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
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  //------------------------------------------------------------------------------------------------
10  override SCR_EMapMarkerType GetMarkerType()
11  {
12  return SCR_EMapMarkerType.SIMPLE;
13  }
14 
15  //------------------------------------------------------------------------------------------------
16  override void InitClientSettings(SCR_MapMarkerBase marker, SCR_MapMarkerWidgetComponent widgetComp)
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 //------------------------------------------------------------------------------------------------
43 class 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  //------------------------------------------------------------------------------------------------
77  Color GetColor()
78  {
79  return Color.FromInt(m_Color.PackToInt());
80  }
81 
82  //------------------------------------------------------------------------------------------------
83  string GetText()
84  {
85  return m_sText;
86  }
87 
88 }
89 
90 //------------------------------------------------------------------------------------------------
91 class SCR_MapMarkerSimpleTitle: BaseContainerCustomTitle
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 }
SCR_MapMarkerBase
Definition: SCR_MapMarkerBase.c:3
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_MapMarkerTitle
Definition: SCR_MapMarkerEntryPlaced.c:189
SCR_MapMarkerEntryConfig
Base entry config.
Definition: SCR_MapMarkerConfig.c:50
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_EMapMarkerType
SCR_EMapMarkerType
Definition: SCR_MapMarkerConfig.c:5
m_aSimpleEntries
protected ref array< ref SCR_MarkerSimpleConfig > m_aSimpleEntries
Definition: SCR_MapMarkerEntryImageText.c:3
SCR_MapMarkerEntryImageText
Basic image & text entry.
Definition: SCR_MapMarkerEntryImageText.c:4
GetColor
Color GetColor()
Definition: SCR_EditableCommentComponent.c:52
m_Color
ref Color m_Color
Definition: SCR_GeneratorBaseEntity.c:3
BaseContainerProps
SCR_MapMarkerEntryImageText SCR_MapMarkerEntryConfig BaseContainerProps()
Placed marker color entry.
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
SCR_MapMarkerWidgetComponent
Definition: SCR_MapMarkerWidgetComponent.c:3
SCR_MapMarkerSimpleTitle
SCR_MapMarkerEntryImageText SCR_MapMarkerEntryConfig SCR_MapMarkerSimpleTitle()] class SCR_MarkerSimpleConfig
Definition: SCR_MapMarkerEntryImageText.c:42
m_sName
protected LocalizedString m_sName
Definition: SCR_GroupIdentityComponent.c:19
GetText
string GetText()
Definition: SCR_BaseEditorAttribute.c:480
m_sText
class SCR_BaseEditorAttribute m_sText
SCR_MapMarkerSimpleTitle
Definition: SCR_MapMarkerEntryImageText.c:91