Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_MapPropsConfig.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
5{
6 //------------------------------------------------------------------------------------------------
8 void SetDefaults(MapLayer layer)
9 {}
10};
11
12//------------------------------------------------------------------------------------------------
16{
17 [Attribute("", UIWidgets.Object, "Building types", "")]
18 ref array<ref SCR_BuildingTypeProps> m_aBuildingTypes;
19
20 //------------------------------------------------------------------------------------------------
21 override void SetDefaults(MapLayer layer)
22 {
23 MapBuildingProps buildingProps = layer.GetBuildingProps();
24
25 if (m_aBuildingTypes.IsEmpty())
26 return;
27
28 foreach (SCR_BuildingTypeProps buildingType : m_aBuildingTypes)
29 {
30 buildingProps.SetOutlineWidth(buildingType.m_iType, buildingType.m_fOutlineWidth);
31 buildingProps.SetLineColor(buildingType.m_iType, buildingType.m_FillColor);
32 buildingProps.SetOutlineColor(buildingType.m_iType, buildingType.m_OutlineColor);
33 buildingProps.SetLineType(buildingType.m_iType, buildingType.m_iOutlineStyle);
34
35 if (layer.Index() <= buildingType.m_iViewLayerVisibility)
36 buildingProps.SetVisibility(buildingType.m_iType, true); // buildings are not visible by default
37 }
38 }
39};
40
41//------------------------------------------------------------------------------------------------
45{
46 [Attribute("0", UIWidgets.ComboBox, "Building type", "", ParamEnumArray.FromEnum(EMapBuildingType))]
47 int m_iType;
48
49 [Attribute("4", UIWidgets.EditBox, desc: "Layer ID, determines up to which layer is this descriptor type visible")]
50 int m_iViewLayerVisibility;
51
52 [Attribute("1", UIWidgets.EditBox, desc: "Width of the outline", "")]
53 float m_fOutlineWidth;
54
55 [Attribute("0 0 0 1", UIWidgets.ColorPicker, desc: "Outline color")]
56 ref Color m_OutlineColor;
57
58 [Attribute("0", UIWidgets.ComboBox, "Building outline style", "", ParamEnumArray.FromEnum(EMapLineType))]
59 int m_iOutlineStyle;
60
61 [Attribute("0.5 0.5 0.5 1", UIWidgets.ColorPicker, desc: "Fill color")]
62 ref Color m_FillColor;
63};
64
65//------------------------------------------------------------------------------------------------
68{
69 //------------------------------------------------------------------------------------------------
70 override bool _WB_GetCustomTitle(BaseContainer source, out string title)
71 {
72 int type;
73 source.Get("m_iType", type);
74 title = typename.EnumToString(EMapBuildingType, type);
75
76 return true;
77 }
78};
79
80//------------------------------------------------------------------------------------------------
84{
85 const int MAIN_GRID_SIZE = 100000; // meters, has to be bigger than square size for grid coords to work
86
87 [Attribute("1", UIWidgets.EditBox, desc: "Line width", "")]
88 float m_fLineWidth;
89
90 [Attribute("0 0 0 1", UIWidgets.ColorPicker, desc: "Line color")]
91 ref Color m_LineColor;
92
93 [Attribute("{3E7733BAC8C831F6}UI/Fonts/RobotoCondensed/RobotoCondensed_Regular.fnt", UIWidgets.ResourceNamePicker, desc: "Font", params: "fnt")]
94 ResourceName m_TextFont;
95
96 [Attribute("20", UIWidgets.EditBox, desc: "Font size")]
97 int m_iTextSize;
98
99 [Attribute("0", UIWidgets.CheckBox, desc: "Use bold text")]
100 bool m_bBoldText;
101
102 [Attribute("0", UIWidgets.CheckBox, desc: "Use italic text")]
103 bool m_bItalicText;
104
105 [Attribute("0 0 0 1", UIWidgets.ColorPicker, desc: "Text color")]
106 ref Color m_TextColor;
107
108 //------------------------------------------------------------------------------------------------
109 override void SetDefaults(MapLayer layer)
110 {
111 // Grid configuration
112 MapGridProps gridProps = layer.GetGridProps();
113 gridProps.SetMainGridSize(MAIN_GRID_SIZE);
114 gridProps.SetLineWidth(m_fLineWidth);
115 gridProps.SetMainLineWidth(m_fLineWidth*2);
116 gridProps.SetLineColor(m_LineColor);
117 gridProps.SetFont(m_TextFont);
118 gridProps.SetFontsize(m_iTextSize);
119 gridProps.SetTextColor(m_TextColor);
120 gridProps.SetMainGridLineColor(Color.FromInt(Color.BLACK));
121
122 if (m_bBoldText)
123 gridProps.SetTextBold();
124
125 if (m_bItalicText)
126 gridProps.SetTextItalic();
127 }
128};
129
130//------------------------------------------------------------------------------------------------
134{
135 [Attribute("5", UIWidgets.EditBox, desc: "Line width")]
136 float m_fLineWidth;
137
138 [Attribute("5", UIWidgets.EditBox, desc: "Number of segments")]
139 int m_iSegmentCount;
140
141 [Attribute("1 1 1 1", UIWidgets.ColorPicker, desc: "Segment color A")]
142 ref Color m_SegmentColorA;
143
144 [Attribute("0 0 0 1", UIWidgets.ColorPicker, desc: "Segment color B")]
145 ref Color m_SegmentColorB;
146
147 [Attribute("{E2CBA6F76AAA42AF}UI/Fonts/Roboto/Roboto_Regular.fnt", UIWidgets.ResourceNamePicker, desc: "Font", params: "fnt")]
148 ResourceName m_TextFont;
149
150 [Attribute("16", UIWidgets.EditBox, desc: "Font size")]
151 int m_iTextSize;
152
153 [Attribute("0", UIWidgets.CheckBox, desc: "Use bold text")]
154 bool m_bBoldText;
155
156 [Attribute("0", UIWidgets.CheckBox, desc: "Use italic text")]
157 bool m_bItalicText;
158
159 [Attribute("0 0 0 1", UIWidgets.ColorPicker, desc: "Distance text color")]
160 ref Color m_TextColor;
161
162 [Attribute("40", UIWidgets.EditBox, desc: "Offset percentage in X", "")]
163 float m_fOffsetX;
164
165 [Attribute("40", UIWidgets.EditBox, desc: "Offset percentage in Y", "")]
166 float m_fOffsetY;
167
168 [Attribute("0", UIWidgets.CheckBox, desc: "Set alignment from default left to the right")]
169 bool m_bAlignRight;
170
171 [Attribute("0", UIWidgets.CheckBox, desc: "Set alignment from default bot to the top")]
172 bool m_bAlignTop;
173
174 //------------------------------------------------------------------------------------------------
175 override void SetDefaults(MapLayer layer)
176 {
177 MapLegendProps legendProps = layer.GetLegendProps();
178 legendProps.SetLineWidth(m_fLineWidth);
179 legendProps.SetSegmentNumber(m_iSegmentCount);
180 legendProps.SetSegment1Color(m_SegmentColorA);
181 legendProps.SetSegment2Color(m_SegmentColorB);
182 legendProps.SetFont(m_TextFont);
183 legendProps.SetDistanceTextSize(m_iTextSize);
184 legendProps.SetUnitTextSize(m_iTextSize);
185 legendProps.SetUnitTextColor(m_TextColor);
186 legendProps.SetDistanceTextColor(m_TextColor);
187 legendProps.SetOffsetX(m_fOffsetX);
188 legendProps.SetOffsetY(m_fOffsetY);
189 legendProps.SetAlignRight(m_bAlignRight);
190 legendProps.SetAlignTop(m_bAlignTop);
191
192 if (m_bBoldText)
193 legendProps.SetTextBold();
194
195 if (m_bItalicText)
196 legendProps.SetTextItalic();
197 }
198};
199
200//------------------------------------------------------------------------------------------------
204{
205 [Attribute("3", UIWidgets.EditBox, desc: "Global setting for all contour types. Contours are visible up to this layer, 0 for not visible", "0 100")]
206 int m_iViewLayerVisibility;
207
208 [Attribute("1.2", UIWidgets.EditBox, desc: "Contour width")]
209 float m_fContourWidth;
210
211 [Attribute("1.8", UIWidgets.EditBox, desc: "Major contour width")]
212 float m_fMajorContourWidth;
213
214 [Attribute("3", UIWidgets.EditBox, desc: "Coastal contour width")]
215 float m_fCoastalContourWidth;
216
217 [Attribute("0 0 0 1", UIWidgets.ColorPicker, desc: "Coastal contour color")]
218 ref Color m_CoastalColor;
219
220 [Attribute("0 0 0 1", UIWidgets.ColorPicker, desc: "Ocean contour color")]
221 ref Color m_OceanColor;
222
223 [Attribute("0 0 0 1", UIWidgets.ColorPicker, desc: "Land contour color")]
224 ref Color m_LandColor;
225
226 //------------------------------------------------------------------------------------------------
227 override void SetDefaults(MapLayer layer)
228 {
229 // Contour configuration
230 MapContourProps contourProps = layer.GetContourProps();
231 contourProps.SetMajorWidth(m_fMajorContourWidth);
232 contourProps.SetContourWidth(m_fContourWidth);
233 contourProps.SetCostalWidth(m_fCoastalContourWidth);
234
235 contourProps.SetCoastColor(m_CoastalColor);
236 contourProps.SetOceanColor(m_OceanColor);
237 contourProps.SetLandColor(m_LandColor);
238
239 if (layer.Index() > m_iViewLayerVisibility)
240 contourProps.EnableVisualisation(false);
241 }
242};
243
244//------------------------------------------------------------------------------------------------
248{
249 [Attribute("", UIWidgets.Object, "Road types", "")]
250 ref array<ref SCR_RoadTypeProps> m_aRoadTypes;
251
252 //------------------------------------------------------------------------------------------------
253 override void SetDefaults(MapLayer layer)
254 {
255 MapRoadProps roadProps = layer.GetRoadProps();
256
257 if (m_aRoadTypes.IsEmpty())
258 return;
259
260 foreach (SCR_RoadTypeProps roadType : m_aRoadTypes)
261 {
262 roadProps.SetLineWidth(roadType.m_iType, roadType.m_fWidth);
263 roadProps.SetBorderLineWidth(roadType.m_iType, roadType.m_fOutlineWidth);
264 roadProps.SetColor(roadType.m_iType, roadType.m_Color);
265 roadProps.SetBorderColor(roadType.m_iType, roadType.m_fOutlineColor);
266 roadProps.SetLineType(roadType.m_iType, roadType.m_iStyle);
267
268 if (roadType.m_iStyle == EMapLineType.LT_DASHED) // there are only applied to dashed style road types
269 {
270 roadProps.SetDashedLineLength(roadType.m_iType, roadType.m_fDashedLineLength);
271 roadProps.SetDashedLineGapLength(roadType.m_iType, roadType.m_fDashedLineGapLength);
272 roadProps.SetSecondaryColor(roadType.m_iType, roadType.m_DashedSecondaryColor);
273 }
274
275 if (layer.Index() > roadType.m_iVisibility)
276 roadProps.SetVisibility(roadType.m_iType, false); // roads are visible by default
277
278 if (layer.Index() <= roadType.m_iOutlineVisibility)
279 roadProps.SetBorderVisibility(roadType.m_iType, true); // outlines are invisible by default
280 }
281 }
282};
283
284//------------------------------------------------------------------------------------------------
288{
289 [Attribute("0", UIWidgets.ComboBox, "Road type", "", ParamEnumArray.FromEnum(RoadType))]
290 int m_iType;
291
292 [Attribute("4", UIWidgets.EditBox, desc: "Layer ID, determines up to which layer is this road type visible, 0 means not visible")]
293 int m_iVisibility;
294
295 [Attribute("0", UIWidgets.ComboBox, "Road line style", "", ParamEnumArray.FromEnum(EMapLineType))]
296 int m_iStyle;
297
298 [Attribute("2.5", UIWidgets.EditBox, desc: "Runway width")]
299 float m_fWidth;
300
301 [Attribute("1 1 1 1", UIWidgets.ColorPicker, desc: "Runway color")]
302 ref Color m_Color;
303
304 [Attribute("0", UIWidgets.EditBox, desc: "Layer ID, determines up to which layer is this road type outline visible, 0 means not visible")]
305 int m_iOutlineVisibility;
306
307 [Attribute("1", UIWidgets.EditBox, desc: "Runway outline width")]
308 float m_fOutlineWidth;
309
310 [Attribute("0 0 0 1", UIWidgets.ColorPicker, desc: "Runway outline color")]
311 ref Color m_fOutlineColor;
312
313 [Attribute("10", UIWidgets.EditBox, desc: "Dashed Line only! Segment length")]
314 float m_fDashedLineLength;
315
316 [Attribute("1", UIWidgets.EditBox, desc: "Dashed Line only! Gap length")]
317 float m_fDashedLineGapLength;
318
319 [Attribute("0 0 0 0", UIWidgets.ColorPicker, desc: "Dashed Line only! Secondary segment color")]
320 ref Color m_DashedSecondaryColor;
321};
322
323//------------------------------------------------------------------------------------------------
326{
327 //------------------------------------------------------------------------------------------------
328 override bool _WB_GetCustomTitle(BaseContainer source, out string title)
329 {
330 int type;
331 source.Get("m_iType", type);
332 title = typename.EnumToString(RoadType, type);
333
334 return true;
335 }
336};
337
338//------------------------------------------------------------------------------------------------
342{
343 [Attribute("", UIWidgets.Object, "Powerline types", "")]
344 ref array<ref SCR_PowerlineTypeProps> m_aPowerlineTypes;
345
346 //------------------------------------------------------------------------------------------------
347 override void SetDefaults(MapLayer layer)
348 {
349 MapPowerLineProps powerlineProps = layer.GetPowerLineProps();
350
351 if (m_aPowerlineTypes.IsEmpty())
352 return;
353
354 foreach (SCR_PowerlineTypeProps powerlineType : m_aPowerlineTypes)
355 {
356 powerlineProps.SetLineWidth(powerlineType.m_iType, powerlineType.m_fLineWidth);
357 powerlineProps.SetLineColor(powerlineType.m_iType, powerlineType.m_LineColor);
358
359 powerlineProps.SetIconViewLayer(powerlineType.m_iType, powerlineType.m_iIconVisibility);
360 powerlineProps.SetIconQuality(powerlineType.m_iType, powerlineType.m_iIconQuality);
361 powerlineProps.SetIconRadius(powerlineType.m_iType, powerlineType.m_fIconRadius);
362 powerlineProps.SetIconSize(powerlineType.m_iType, powerlineType.m_fIconSize);
363
364 if (layer.Index() > powerlineType.m_iVisibility)
365 powerlineProps.SetVisibility(powerlineType.m_iType, false); // powerlines are visible by default
366 }
367 }
368};
369
370//------------------------------------------------------------------------------------------------
374{
375 [Attribute("0", UIWidgets.ComboBox, "Powrline type", "", ParamEnumArray.FromEnum(EMapPowerlineType))]
376 int m_iType;
377
378 [Attribute("4", UIWidgets.EditBox, desc: "Layer ID, determines up to which layer is this powerline type visible, 0 means not visible")]
379 int m_iVisibility;
380
381 [Attribute("2.2", UIWidgets.EditBox, desc: "Line width")]
382 float m_fLineWidth;
383
384 [Attribute("0 0 0 1", UIWidgets.ColorPicker, desc: "Line color")]
385 ref Color m_LineColor;
386
387 [Attribute("0", UIWidgets.EditBox, desc: "Layer ID, determines up to which layer is this road type icon visible, 0 means not visible")]
388 int m_iIconVisibility;
389
390 [Attribute("1", UIWidgets.EditBox, desc: "radius of the icon")]
391 float m_fIconRadius;
392
393 [Attribute("12", UIWidgets.EditBox, desc: "quality of the icon")]
394 float m_iIconQuality;
395
396 [Attribute("1.5", UIWidgets.EditBox, desc: "size of the icon")]
397 float m_fIconSize;
398};
399
400//------------------------------------------------------------------------------------------------
403{
404 //------------------------------------------------------------------------------------------------
405 override bool _WB_GetCustomTitle(BaseContainer source, out string title)
406 {
407 int type;
408 source.Get("m_iType", type);
409 title = typename.EnumToString(EMapPowerlineType, type);
410
411 return true;
412 }
413};
414
415//------------------------------------------------------------------------------------------------
419{
420 [Attribute("1 1 1 1", UIWidgets.ColorPicker, desc: "River and lake water color")]
421 ref Color m_LandWaterColor;
422
423 //------------------------------------------------------------------------------------------------
424 override void SetDefaults(MapLayer layer)
425 {
426 MapWaterBodyProps waterProps = layer.GetWaterBodyProps();
427 waterProps.SetWaterColor(m_LandWaterColor);
428 }
429};
430
431//------------------------------------------------------------------------------------------------
435{
436 [Attribute("0 0 0 1", UIWidgets.ColorPicker, desc: "Icon color")]
437 ref Color m_IconColor;
438
439 [Attribute("0 0 0 1", UIWidgets.ColorPicker, desc: "Text color")]
440 ref Color m_TextColor;
441
442 [Attribute("200", UIWidgets.EditBox, desc: "Major hill floor limit")]
443 float m_fMajorHillFloorLimit;
444
445 [Attribute("100", UIWidgets.EditBox, desc: "Significant hill floor limit")]
446 float m_fSignificantHillFloorLimit;
447
448 //------------------------------------------------------------------------------------------------
449 override void SetDefaults(MapLayer layer)
450 {
451 MapHillProps hillProps = layer.GetHillProps();
452 hillProps.SetMajorHillFloorLimit(m_fMajorHillFloorLimit);
453 hillProps.SetSignificantHillFloorLimit(m_fSignificantHillFloorLimit);
454 hillProps.SetColor(m_IconColor);
455 hillProps.SetTextColor(m_TextColor);
456 }
457};
458
459//------------------------------------------------------------------------------------------------
463{
464 [Attribute("", UIWidgets.Object, "Area types", "")]
465 ref array<ref SCR_AreaTypeProps> m_aAreaTypes;
466
467 //------------------------------------------------------------------------------------------------
468 override void SetDefaults(MapLayer layer)
469 {
470 MapAreaProperties areaProps = layer.GetAreaProps();
471
472 if (m_aAreaTypes.IsEmpty())
473 return;
474
475 foreach (SCR_AreaTypeProps areaType : m_aAreaTypes)
476 {
477 areaProps.SetAreaColor(areaType.m_iType, areaType.m_Color);
478 areaProps.SetIndividualColor(areaType.m_iType, areaType.m_ColorIndividual);
479
480 if (layer.Index() > areaType.m_iVisibility)
481 areaProps.SetVisibility(areaType.m_iType, false); // areas are visible by default
482
483 if (areaType.m_iVisibilityIndividual != 0 && layer.Index() < areaType.m_iVisibilityIndividual)
484 areaProps.SetVisualizationType(areaType.m_iType, EMapAreaVisualizationType.VT_INDIVIDUAL);
485 else
486 areaProps.SetVisualizationType(areaType.m_iType, EMapAreaVisualizationType.VT_AREA);
487 }
488 }
489};
490
491//------------------------------------------------------------------------------------------------
495{
496 [Attribute("0", UIWidgets.ComboBox, "Area type", "", ParamEnumArray.FromEnum(EMapAreaType))]
497 int m_iType;
498
499 [Attribute("6", UIWidgets.EditBox, desc: "Layer ID, determines up to which layer is this area type visible, 0 means not visible")]
500 int m_iVisibility;
501
502 [Attribute("0.5 0.5 0.5 1", UIWidgets.ColorPicker, desc: "Area color")]
503 ref Color m_Color;
504
505 [Attribute("0", UIWidgets.EditBox, desc: "Layer ID, if set, determines up to which layer is this area type visible in individual mode, 0 to disable")]
506 int m_iVisibilityIndividual;
507
508 [Attribute("0.5 0.5 0.5 1", UIWidgets.ColorPicker, desc: "Color when in individual object display")]
509 ref Color m_ColorIndividual;
510};
511
512//------------------------------------------------------------------------------------------------
515{
516 //------------------------------------------------------------------------------------------------
517 override bool _WB_GetCustomTitle(BaseContainer source, out string title)
518 {
519 int type;
520 source.Get("m_iType", type);
521 title = typename.EnumToString(EMapAreaType, type);
522
523 return true;
524 }
525};
526
527//------------------------------------------------------------------------------------------------
531{
532 [Attribute("4", UIWidgets.EditBox, desc: "Layer ID, determines up to which layer is this descriptor type visible")]
533 int m_iViewLayerVisibility;
534
535 [Attribute("1", UIWidgets.CheckBox, desc: "Set if shape interior is filled or hollow")]
536 bool m_bIsHollow;
537
538 [Attribute("0", UIWidgets.ComboBox, "Shape type", "", ParamEnumArray.FromEnum(EMapDrawingShapeType))]
539 int m_iShapeType;
540
541 [Attribute("96", UIWidgets.EditBox, desc: "Level of detail", "0 255")]
542 int m_iDetail;
543
544 [Attribute("0", UIWidgets.ComboBox, "Shape outline type", "", ParamEnumArray.FromEnum(EMapLineType))]
545 int m_iOutlineType;
546
547 [Attribute("1", UIWidgets.EditBox, desc: "Width of the outline", "")]
548 float m_fOutlineWidth;
549
550 [Attribute("0 0 0 1", UIWidgets.ColorPicker, desc: "Outline color")]
551 ref Color m_OutlineColor;
552
553 [Attribute("0.5 0.5 0.5 1", UIWidgets.ColorPicker, desc: "Fill color")]
554 ref Color m_FillColor;
555
556 //------------------------------------------------------------------------------------------------
557 override void SetDefaults(MapLayer layer)
558 {
559 MapDrawingProps drawingProps = layer.GetMapDrawingProps();
560 if (layer.Index() > m_iViewLayerVisibility)
561 drawingProps.SetVisible(false);
562
563 drawingProps.SetHollow(m_bIsHollow);
564 drawingProps.SetShapeType(m_iShapeType);
565 drawingProps.SetDetail(m_iDetail);
566 drawingProps.SetOutlineType(m_iOutlineType);
567 drawingProps.SetOutlineWidth(m_fOutlineWidth);
568 drawingProps.SetOutlineColor(m_OutlineColor);
569 drawingProps.SetInteriorColor(m_FillColor);
570 }
571};
LayerPresets layer
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
EDamageType type
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition Color.c:13
Configuration of area props.
Configuration of visibility in layers per descriptor type.
Custom names for defined zones to make config setup easier.
Configuration of building props.
Configuration of visibility in layers per descriptor type.
Custom names for defined buildings to make config setup easier.
Configuration of contour props.
Configuration of drawing props.
Configuration of grid props.
Configuration of hill props.
Configuration of legend props.
Property type base.
Configuration of powerline props.
Configuration of visibility in layers per descriptor type.
Custom names for defined zones to make config setup easier.
Configuration of road props.
Configuration of visibility in layers per descriptor type.
Custom names for defined zones to make config setup easier.
Configuration of water body props.
SCR_FieldOfViewSettings Attribute
EMapPowerlineType
EMapDrawingShapeType
EMapAreaType
EMapBuildingType
EMapLineType
RoadType
Definition RoadType.c:16