Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_MapConfig.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
3 [BaseContainerProps(configRoot: true)]
5 {
6  [Attribute("0", UIWidgets.ComboBox, "Map mode", "", ParamEnumArray.FromEnum(EMapEntityMode), category: "Map Config")]
7  int m_iMapMode;
8 
9  [Attribute("", UIWidgets.Object, desc: "Layers config", "conf class=SCR_MapLayersBase")]
10  ref SCR_MapLayersBase m_LayersConfig;
11 
12  [Attribute("", UIWidgets.Object, desc: "Map properties config", "conf class=SCR_MapPropsBase")]
13  ref SCR_MapPropsBase m_MapPropsConfig;
14 
15  [Attribute("", UIWidgets.Object, "Map modules")]
16  ref array<ref SCR_MapModuleBase> m_aModules;
17 
18  [Attribute("", UIWidgets.Object, "Map UI components")]
19  ref array<ref SCR_MapUIBaseComponent> m_aUIComponents;
20 
21  [Attribute(defvalue: "0", uiwidget: UIWidgets.CheckBox, desc: "Legend scale component")] // TODO use UIWidget.Flags here EMapOtherComponents
22  bool m_bEnableLegendScale;
23 
24  [Attribute(defvalue: "1", uiwidget: UIWidgets.CheckBox, desc: "Grid component")]
25  bool m_bEnableGrid;
26 
27  [Attribute("", UIWidgets.Object, desc: "Descriptor visibility config", "conf class=SCR_MapDescriptorVisibilityBase")]
28  ref SCR_MapDescriptorVisibilityBase m_DescriptorVisibilityConfig;
29 
30  [Attribute("", UIWidgets.Object, desc: "Descriptor defaults config", "conf class=SCR_MapDescriptorDefaults")]
31  ref SCR_MapDescriptorDefaults m_DescriptorDefaultsConfig;
32 };
33 //------------------------------------------------------------------------------------------------
37 {
38  [Attribute("0", UIWidgets.ComboBox, "Descriptor type", "", ParamEnumArray.FromEnum(EMapDescriptorType))]
39  int m_iDescriptorType;
40 
41  [Attribute("0", UIWidgets.EditBox, desc: "Layer ID, determines up to which layer is this descriptor type visible, 0 means not visible")]
42  int m_iViewLayer;
43 };
44 
45 //------------------------------------------------------------------------------------------------
47 class SCR_DescriptorViewTitle: BaseContainerCustomTitle
48 {
49  //------------------------------------------------------------------------------------------------
50  override bool _WB_GetCustomTitle(BaseContainer source, out string title)
51  {
52  int type;
53  source.Get("m_iDescriptorType", type);
54  title = typename.EnumToString(EMapDescriptorType, type);
55 
56  return true;
57  }
58 };
59 
60 //------------------------------------------------------------------------------------------------
63 {
64  [Attribute(defvalue: "1", uiwidget: UIWidgets.EditBox, desc: "Determines value at which layer switches to a higher one \n Value is in 1000*units (kilometers) visible per 2000 pixels", params: "0.1 100")]
65  float m_fLayerCeiling;
66 
67  [Attribute(defvalue: "100", uiwidget: UIWidgets.EditBox, desc: "Set map grid square size")]
68  float m_fGridSquareSize;
69 
70  [Attribute(defvalue: "50", uiwidget: UIWidgets.EditBox, desc: "Set map legend scale size in meters")]
71  float m_fLegendScaleSize;
72 
73  [Attribute(defvalue: "10", uiwidget: UIWidgets.EditBox, desc: "Set density of minor countours, distance between the contour lines, lower layers should have lower numbers")]
74  float m_fContourDensity;
75 
76  [Attribute(defvalue: "50", uiwidget: UIWidgets.EditBox, desc: "Set density of major contours, distance between the contour lines")]
77  float m_fMajorContourDensity;
78 
79  //------------------------------------------------------------------------------------------------
80  void SetLayerProps(MapLayer layer)
81  {
82  layer.SetCeiling(2 / m_fLayerCeiling); // 2000/1000 px as a reference val, divided by configured units(kilometers)
83 
84  MapGridProps gridProps = layer.GetGridProps();
85  gridProps.SetGridStepSize(m_fGridSquareSize);
86 
87  MapContourProps contProps = layer.GetContourProps();
88  contProps.SetContourDensity(m_fContourDensity);
89  contProps.SetMajorDensity(m_fMajorContourDensity);
90 
91  MapLegendProps legendProps = layer.GetLegendProps();
92  legendProps.SetTotalSegmentLength(m_fLegendScaleSize);
93  }
94 };
95 
96 //------------------------------------------------------------------------------------------------
98 [BaseContainerProps(configRoot: true)]
100 {
101  [Attribute("", UIWidgets.Object, "Map properties configuration")]
102  ref array<ref SCR_MapPropsConfig> m_aMapPropConfigs;
103 };
104 
105 //------------------------------------------------------------------------------------------------
107 [BaseContainerProps(configRoot: true)]
109 {
110  [Attribute("", UIWidgets.Object, "Layers")]
111  ref array<ref SCR_LayerConfiguration> m_aLayers;
112 };
113 
114 //------------------------------------------------------------------------------------------------
116 [BaseContainerProps(configRoot: true)]
118 {
119  [Attribute("", UIWidgets.Object, "Descriptor layers", "")]
120  ref array<ref SCR_DescriptorViewLayer> m_aDescriptorViewLayers;
121 };
SCR_MapPropsBase
Map props root.
Definition: SCR_MapConfig.c:99
SCR_LayerConfiguration
Definition: SCR_MapConfig.c:62
SCR_DescriptorViewTitle
Custom names for defined zones to make config setup easier.
Definition: SCR_MapConfig.c:47
SCR_MapConfig
Map config root.
Definition: SCR_MapConfig.c:4
SCR_MapDescriptorDefaults
Config for default values set per descriptor type.
Definition: SCR_MapDescriptorDefaults.c:4
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_MapDescriptorVisibilityBase
Descriptor visibility config root.
Definition: SCR_MapConfig.c:117
Attribute
typedef Attribute
Post-process effect of scripted camera.
EMapDescriptorType
EMapDescriptorType
Definition: EMapDescriptorType.c:15
type
EDamageType type
Definition: SCR_DestructibleTreeV2.c:32
MapGridProps
Definition: MapGridProps.c:12
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
MapLegendProps
Definition: MapLegendProps.c:12
EMapEntityMode
EMapEntityMode
Mode of the map.
Definition: SCR_MapConstants.c:28
SCR_DescriptorViewLayer
Configuration of visibility in layers per descriptor type.
Definition: SCR_MapConfig.c:36
MapContourProps
Definition: MapContourProps.c:12
MapLayer
Definition: MapLayer.c:12
SCR_MapLayersBase
Layer config root.
Definition: SCR_MapConfig.c:108
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180