Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_SelectionBrushTool.c
Go to the documentation of this file.
1#ifdef WORKBENCH
2[WorkbenchToolAttribute(
3 name: "Object Selection Brush",
4 description: "Select objects by 2D or 3D radius - click or click and drag\n" +
5 "Escape to deselect everything\n" +
6 "Space to switch to selection eraser mode\n" +
7 "Shift to temporarily bypass the filter\n" +
8 "Ctrl+Click to forcefully add/remove an entity to the selection",
9 // shortcut: "S", // unused
10 wbModules: { "WorldEditor" },
11 awesomeFontCode: 0xF111)]
12class SCR_SelectionBrushTool : WorldEditorTool
13{
14 /*
15 Category: Brush
16 */
17
18 [Attribute(defvalue: "10", uiwidget: UIWidgets.Slider, desc: "Brush radius", params: string.Format("%1 %2 %3", RADIUS_MIN, RADIUS_MAX, RADIUS_STEP), category: "Brush")]
19 protected float m_fRadius;
20
21 [Attribute(defvalue: "1", desc: "Use 3D detection, otherwise use 2D", category: "Brush")]
22 protected bool m_bDetectBySphere;
23
24 [Attribute(defvalue: "0", desc: "Snap brush to objects, otherwise ignore them", category: "Brush")]
25 protected bool m_bSnapToObjects;
26
27 [Attribute(desc: "Find objects using world Trace instead of Entities with MeshObjects - 2-3× the performance cost", category: "Brush")]
28 protected bool m_bUseTraceDetection;
29
30 /*
31 Category: Selection
32 */
33
34 [Attribute(defvalue: SCR_ESelectionBrushToolLayer.ALL_LAYERS.ToString(), uiwidget: UIWidgets.ComboBox, enumType: SCR_ESelectionBrushToolLayer, category: "Selection")]
35 SCR_ESelectionBrushToolLayer m_eLayerSelection;
36
37 [Attribute(defvalue: "0", desc: "Select the topmost 3D parent, otherwise select the 3D world entity", category: "Selection")]
38 protected bool m_bSelectParentOnly;
39
40 [Attribute(defvalue: "2000", desc: "Performance-related selection limit - 0 for no limit", uiwidget: UIWidgets.Slider, params: "0 10000 100", category: "Selection")]
41 protected int m_iMaxSelectedEntities;
42
43 /*
44 Category: Filter
45 */
46
47 [Attribute(desc: "Define a list of objects to select - can take a SCR_ObjectBrushArrayConfig .conf", category: "Filter")]
48 protected ref SCR_SelectionBrushConfig m_ObjectsFilter;
49
50 protected ref TraceSphere m_TraceSphere;
51
52 protected bool m_bIsWorldValid;
53 protected bool m_bIsMouseHeldDown;
54 protected bool m_bIsInRemovalMode;
55 protected bool m_bSmiley;
56 protected bool m_bLimitReachedWarning;
57
62 protected ref array<ref Shape> m_aBrushShapes;
63
64 protected vector m_vBrushShapePos;
65
66 protected static const int BRUSH_SHAPE_INDEX = 3;
67 protected static const int BRUSH_COLOUR_ON_HOLD = ARGB(64, 128, 128, 128);
68 protected static const int BRUSH_COLOUR_NORMAL = ARGB(128, 128, 128, 0);
69 protected static const int BRUSH_COLOUR_NORMAL_2D = ARGB(255, 0, 255, 0);
70 protected static const int BRUSH_COLOUR_GUIDE_2D = ARGB(64, 0, 255, 0);
71 protected static const int BRUSH_COLOUR_CAN_ADD = ARGB(128, 128, 64, 0);
72 protected static const int BRUSH_COLOUR_ADDED = ARGB(192, 128, 0, 0);
73 protected static const int BRUSH_COLOUR_REMOVAL = ARGB(128, 64, 64, 255);
74 protected static const int BRUSH_COLOUR_REMOVED = ARGB(192, 0, 0, 128);
75 protected static const int BRUSH_COLOUR_ALTITUDE = ARGB(255, 255, 0, 0);
76 protected static const int BRUSH_GUIDE_2D_HEIGHT = 1000;
77 protected static const float BRUSH_ALTITUDE_TOLERANCE = 0.5;
78
79 protected static const float RADIUS_MIN = 1;
80 protected static const float RADIUS_MAX = 100;
81 protected static const float RADIUS_STEP = 1;
82
83 protected static const int BRUSH_2D_Y_SEARCH = 10000; // 5k up, 5k down
84 // protected static const string MESHOBJECT_CLASSNAME = ((typename)MeshObject).ToString();
85 protected static const string MESHOBJECT_CLASSNAME = "MeshObject";
86
87 //------------------------------------------------------------------------------------------------
94 protected override void OnMousePressEvent(float x, float y, WETMouseButtonFlag buttons)
95 {
96 if (!m_bIsWorldValid)
97 return;
98
99 if (buttons != WETMouseButtonFlag.LEFT)
100 return;
101
102 vector traceStart, traceEnd, traceDir;
104 if (m_bSnapToObjects)
105 flags |= TraceFlags.ENTS;
106
107 m_API.TraceWorldPos(x, y, flags, traceStart, traceEnd, traceDir);
108
109 if (traceEnd == vector.Zero)
110 return;
111
112 m_bIsMouseHeldDown = true;
113
114 IEntitySource entity = m_API.GetEntityUnderCursor();
115 if (entity && GetModifierKeyState(ModifierKey.CONTROL))
116 {
117 if (m_API.IsEntitySelected(entity))
118 m_API.RemoveFromEntitySelection(entity);
119 else
120 m_API.AddToEntitySelection(entity);
121 }
122 else
123 {
124 m_bSmiley = Math.RandomFloat01() > 0.999;
125 CreateBrush(traceEnd);
126 if (m_bIsInRemovalMode)
127 DeselectAroundCursor(traceEnd);
128 else
129 SelectAroundCursor(traceEnd);
130
131 m_vBrushShapePos = traceEnd;
132 }
133 }
134
135 //------------------------------------------------------------------------------------------------
141 protected override void OnMouseMoveEvent(float x, float y)
142 {
143 if (!m_bIsWorldValid)
144 return;
145
146 vector traceStart, traceEnd, traceDir;
148 if (m_bSnapToObjects)
149 flags |= TraceFlags.ENTS;
150
151 m_API.TraceWorldPos(x, y, flags, traceStart, traceEnd, traceDir);
152
153 if (traceEnd == vector.Zero)
154 {
155 m_aBrushShapes = null;
156 return;
157 }
158
159 CreateBrush(traceEnd);
160 m_vBrushShapePos = traceEnd;
161
162 if (m_bIsMouseHeldDown)
163 {
164 if (m_bIsInRemovalMode)
165 DeselectAroundCursor(traceEnd);
166 else
167 SelectAroundCursor(traceEnd);
168 }
169 }
170
171 //------------------------------------------------------------------------------------------------
175 protected override void OnWheelEvent(int delta)
176 {
177 // adjusts m_fRadius value using a CTRL + Scrollwheel keybind
178 if (GetModifierKeyState(ModifierKey.CONTROL))
179 {
180 m_fRadius = AdjustValueUsingScrollWheel(delta, m_fRadius, RADIUS_MIN, RADIUS_MAX, RADIUS_STEP);
181 UpdatePropertyPanel();
182
183 if (m_aBrushShapes)
184 CreateBrush(m_vBrushShapePos);
185 }
186 }
187
188 //------------------------------------------------------------------------------------------------
195 protected override void OnMouseReleaseEvent(float x, float y, WETMouseButtonFlag buttons)
196 {
197 if (!m_bIsMouseHeldDown)
198 return;
199
200 if (buttons != WETMouseButtonFlag.LEFT)
201 return;
202
203 m_bIsMouseHeldDown = false;
204 if (m_aBrushShapes)
205 SetBrushColor(BRUSH_COLOUR_ON_HOLD);
206
207 if (m_bLimitReachedWarning)
208 m_bLimitReachedWarning = false;
209 else
210 Print("" + m_API.GetSelectedEntitiesCount() + "/" + m_iMaxSelectedEntities + " entities selected", LogLevel.NORMAL);
211
212 m_API.UpdateSelectionGui();
213 }
214
215 //------------------------------------------------------------------------------------------------
220 protected override void OnKeyPressEvent(KeyCode key, bool isAutoRepeat)
221 {
222 /**/ if (key == KeyCode.KC_ESCAPE)
223 {
224 m_API.ClearEntitySelection();
225 m_API.UpdateSelectionGui();
226 }
227 else if (key == KeyCode.KC_DELETE)
228 {
229 DeleteSelectedEntities();
230 }
231 else if (key == KeyCode.KC_SPACE)
232 {
233 m_bIsInRemovalMode = true;
234 CreateBrush(m_vBrushShapePos);
235 }
236 }
237
238 //------------------------------------------------------------------------------------------------
243 protected override void OnKeyReleaseEvent(KeyCode key, bool isAutoRepeat)
244 {
245 if (key == KeyCode.KC_SPACE)
246 {
247 m_bIsInRemovalMode = false;
248 CreateBrush(m_vBrushShapePos);
249 }
250 }
251
252 //------------------------------------------------------------------------------------------------
253 protected override void OnActivate()
254 {
255 m_bIsWorldValid = IsWorldValid();
256 }
257
258 //------------------------------------------------------------------------------------------------
259 protected override void OnDeActivate()
260 {
261 m_aBrushShapes = null;
262 }
263
264 //------------------------------------------------------------------------------------------------
265 protected override void OnAfterLoadWorld()
266 {
267 m_bIsWorldValid = IsWorldValid();
268 }
269
270 //------------------------------------------------------------------------------------------------
271 protected void SelectAroundCursor(vector cursorWorldPos)
272 {
273 array<IEntity> entities = GetAllEntitiesAroundCursor(cursorWorldPos);
274
275 IEntity entity;
276 IEntitySource entitySource;
277 bool selectFromAllLayers = m_eLayerSelection == SCR_ESelectionBrushToolLayer.ALL_LAYERS;
278 int currentLayerId = m_API.GetCurrentEntityLayerId();
279
280 for (int i = entities.Count() - 1; i >= 0; i--)
281 {
282 entity = entities[i];
283 entitySource = m_API.EntityToSource(entity);
284 if (!entitySource)
285 continue;
286
287 bool remove = false;
288
289 if (!(selectFromAllLayers || CanSelectEntityFromItsLayer(currentLayerId, entitySource))) // layer check
290 remove = true;
291
292 if (!remove && vector.Distance(cursorWorldPos, entity.GetOrigin()) > m_fRadius) // distance check
293 remove = true;
294
295 if (!remove && !m_bUseTraceDetection && !HasMeshObject(entitySource)) // MeshObject check - only on noTrace search
296 remove = true;
297
298 if (!remove && m_bSelectParentOnly && entitySource != GetTopMostParentWithMeshObject(entitySource)) //parent-only check
299 remove = true;
300
301 if (remove)
302 entities.Remove(i);
303 }
304
305 if (entities.IsEmpty())
306 {
307 SetBrushColor(BRUSH_COLOUR_NORMAL);
308 return;
309 }
310
311 if (m_ObjectsFilter && m_ObjectsFilter.m_aPrefabs && !GetModifierKeyState(ModifierKey.SHIFT))
312 {
313 for (int i = entities.Count() - 1; i >= 0; i--)
314 {
315 ResourceName entityPrefab = entities[i].GetPrefabData().GetPrefabName();
316 bool found = false;
317 foreach (ResourceName prefab : m_ObjectsFilter.m_aPrefabs)
318 {
319 if (prefab == string.Empty) // not .IsEmpty() for performance
320 continue;
321
322 if (entityPrefab == prefab)
323 {
324 found = true;
325 break;
326 }
327 }
328
329 if (!found)
330 entities.Remove(i);
331 }
332 }
333
334 int selectedEntitiesCount = m_API.GetSelectedEntitiesCount();
335 foreach (IEntity entity2 : entities)
336 {
337 IEntitySource src2 = m_API.EntityToSource(entity2);
338 if (!src2)
339 continue;
340
341 if (m_iMaxSelectedEntities > 0 && selectedEntitiesCount >= m_iMaxSelectedEntities)
342 break;
343
344 if (m_API.IsEntitySelected(src2))
345 continue;
346
347 m_API.AddToEntitySelection(src2);
348 selectedEntitiesCount++;
349 }
350
351 if (selectedEntitiesCount != m_API.GetSelectedEntitiesCount())
352 SetBrushColor(BRUSH_COLOUR_ADDED);
353 else
354 SetBrushColor(BRUSH_COLOUR_CAN_ADD);
355
356 if (m_iMaxSelectedEntities > 0 && !m_bLimitReachedWarning && selectedEntitiesCount >= m_iMaxSelectedEntities)
357 {
358 PrintFormat("%1/%2 entities selected", selectedEntitiesCount, m_iMaxSelectedEntities, level: LogLevel.WARNING);
359 m_bLimitReachedWarning = true;
360 }
361 }
362
363 //------------------------------------------------------------------------------------------------
364 protected bool CanSelectEntityFromItsLayer(int currentLayerId, notnull IEntitySource entitySource)
365 {
366 return m_eLayerSelection == SCR_ESelectionBrushToolLayer.ALL_LAYERS ||
367 (currentLayerId == entitySource.GetLayerID()) == (m_eLayerSelection == SCR_ESelectionBrushToolLayer.CURRENT_LAYER);
368 }
369
370 //------------------------------------------------------------------------------------------------
371 protected bool HasMeshObject(notnull IEntitySource entitySource)
372 {
373 IEntityComponentSource componentSource;
374 for (int i, count = entitySource.GetComponentCount(); i < count; i++)
375 {
376 componentSource = entitySource.GetComponent(i);
377 if (componentSource.GetClassName() == MESHOBJECT_CLASSNAME)
378 return true;
379 }
380
381 return false;
382 }
383
384 //------------------------------------------------------------------------------------------------
386 protected IEntitySource GetTopMostParentWithMeshObject(notnull IEntitySource entitySource)
387 {
388 IEntitySource parent = entitySource.GetParent();
389
390 while (parent)
391 {
392 if (HasMeshObject(parent))
393 entitySource = parent;
394
395 parent = parent.GetParent();
396 }
397
398 return entitySource;
399 }
400
401 //------------------------------------------------------------------------------------------------
402 // this one does not use Trace, config or layer info
403 protected void DeselectAroundCursor(vector cursorWorldPos)
404 {
405 array<IEntitySource> entities = {};
406
407 for (int i = m_API.GetSelectedEntitiesCount() - 1; i >= 0; i--)
408 {
409 IEntitySource entity = m_API.GetSelectedEntity(i);
410 if (m_bDetectBySphere)
411 {
412 if (vector.Distance(cursorWorldPos, m_API.SourceToEntity(entity).GetOrigin()) <= m_fRadius)
413 entities.Insert(entity);
414 }
415 else
416 {
417 if (vector.DistanceXZ(cursorWorldPos, m_API.SourceToEntity(entity).GetOrigin()) <= m_fRadius)
418 entities.Insert(entity);
419 }
420 }
421
422 foreach (IEntitySource entity : entities)
423 {
424 m_API.RemoveFromEntitySelection(entity);
425 }
426
427 if (entities.IsEmpty())
428 SetBrushColor(BRUSH_COLOUR_REMOVAL);
429 else
430 SetBrushColor(BRUSH_COLOUR_REMOVED);
431 }
432
433 //------------------------------------------------------------------------------------------------
434 protected array<IEntity> GetAllEntitiesAroundCursor(vector cursorWorldPos)
435 {
436 if (m_bUseTraceDetection)
437 {
438 if (m_bDetectBySphere)
439 {
440 m_TraceSphere.Start = cursorWorldPos;
441 // m_TraceSphere.End = cursorWorldPos;
442 m_TraceSphere.Radius = m_fRadius;
443
444 return SCR_WorldEditorToolHelper.TracePositionEntitiesBySphere(m_API.GetWorld(), m_TraceSphere);
445 }
446 else // 2D detection
447 {
448 m_TraceSphere.Start = cursorWorldPos + { 0, BRUSH_2D_Y_SEARCH * 0.5, 0 };
449 m_TraceSphere.End = cursorWorldPos - { 0, BRUSH_2D_Y_SEARCH * 0.5, 0 };
450 m_TraceSphere.Radius = m_fRadius;
451
452 return SCR_WorldEditorToolHelper.TraceMoveEntitiesBySphere(m_API.GetWorld(), m_TraceSphere);
453 }
454 }
455 else // AABB detection
456 {
457 if (m_bDetectBySphere)
458 {
459 return SCR_WorldEditorToolHelper.QueryEntitiesBySphere(m_API.GetWorld(), cursorWorldPos, m_fRadius);
460 }
461 else
462 {
463 vector minAABB = cursorWorldPos - { m_fRadius, BRUSH_2D_Y_SEARCH * 0.5, m_fRadius };
464 vector maxAABB = cursorWorldPos + { m_fRadius, BRUSH_2D_Y_SEARCH * 0.5, m_fRadius };
465 return SCR_WorldEditorToolHelper.QueryEntitiesByAABB(m_API.GetWorld(), minAABB, maxAABB);
466 }
467 }
468 }
469
470 //------------------------------------------------------------------------------------------------
478 protected float AdjustValueUsingScrollWheel(float delta, float currentValue, float min, float max, float step)
479 {
480 // delta returns multiples of 120 - converting it into a more useable value of multiples of 1
481 float value = currentValue + (delta / 120) * step;
482
483 if (value < min)
484 return min;
485
486 if (value > max)
487 return max;
488
489 return value;
490 }
491
492 //------------------------------------------------------------------------------------------------
493 protected void DeleteSelectedEntities()
494 {
495 int selectedEntitiesCount = m_API.GetSelectedEntitiesCount();
496 bool manageEditAction = SCR_WorldEditorToolHelper.BeginEntityAction();
497 Debug.BeginTimeMeasure();
498 for (int i = 0; i < selectedEntitiesCount; i++)
499 {
500 IEntitySource entity = m_API.GetSelectedEntity(i);
501 if (entity) // deleted objects can have children selected too, having them deleted
502 m_API.DeleteEntity(entity);
503 }
504 Debug.EndTimeMeasure("Deleted " + selectedEntitiesCount + " entities");
505 SCR_WorldEditorToolHelper.EndEntityAction(manageEditAction);
506 }
507
508 //------------------------------------------------------------------------------------------------
509 protected void CreateBrush(vector worldPos)
510 {
511 int colour = BRUSH_COLOUR_ON_HOLD;
512 if (m_bIsMouseHeldDown)
513 colour = BRUSH_COLOUR_NORMAL;
514
515 m_aBrushShapes = {};
516
517 // the 2D circle is always present
518 m_aBrushShapes.Insert(CreateCircle(worldPos, vector.Up, m_fRadius, BRUSH_COLOUR_NORMAL_2D, m_fRadius * Math.PI2, ShapeFlags.NOZBUFFER));
519
520 // horizontal line
521 vector points[2] = {
522 worldPos + { -m_fRadius, 0, 0 },
523 worldPos + { m_fRadius, 0, 0 },
524 };
525 m_aBrushShapes.Insert(Shape.CreateLines(BRUSH_COLOUR_NORMAL_2D, ShapeFlags.NOZBUFFER, points, 2));
526
527 // vertical line
528 points = {
529 worldPos + { 0, 0, -m_fRadius },
530 worldPos + { 0, 0, m_fRadius },
531 };
532 m_aBrushShapes.Insert(Shape.CreateLines(BRUSH_COLOUR_NORMAL_2D, ShapeFlags.NOZBUFFER, points, 2));
533
534 // 3D sphere / 2D cylynder
535 if (m_bDetectBySphere)
536 m_aBrushShapes.Insert(Shape.CreateSphere(colour, ShapeFlags.TRANSP | ShapeFlags.DOUBLESIDE, worldPos, m_fRadius));
537 else
538 m_aBrushShapes.Insert(Shape.CreateCylinder(colour, ShapeFlags.TRANSP | ShapeFlags.NOOUTLINE, worldPos, m_fRadius, BRUSH_GUIDE_2D_HEIGHT));
539
540 // altitude indicator
541 float yPos = 100;
542 if (m_bSnapToObjects && m_API.TryGetTerrainSurfaceY(worldPos[0], worldPos[2], yPos) && worldPos[1] - yPos > BRUSH_ALTITUDE_TOLERANCE)
543 {
544 float floorRadius = m_fRadius * 0.5;
545 vector floorPos = { worldPos[0], yPos, worldPos[2] };
546 array<vector> pointsV = {
547 worldPos, // centre
548 floorPos,
549 worldPos + { 0, 0, m_fRadius }, // top
550 floorPos + { 0, 0, floorRadius },
551 worldPos + { m_fRadius, 0, 0 }, // right
552 floorPos + { floorRadius, 0, 0 },
553 worldPos + { 0, 0, -m_fRadius }, // bottom
554 floorPos + { 0, 0, -floorRadius },
555 worldPos + { -m_fRadius, 0, 0 }, // left
556 floorPos + { -floorRadius, 0, 0 },
557 };
558
559 for (int i = 0, count = pointsV.Count(); i < count; i += 2) // step 2
560 {
561 points = {
562 pointsV[i],
563 pointsV[i + 1],
564 };
565 m_aBrushShapes.Insert(Shape.CreateLines(BRUSH_COLOUR_ALTITUDE, ShapeFlags.NOZBUFFER, points, 2));
566 }
567
568 m_aBrushShapes.Insert(CreateCircle(floorPos, vector.Up, floorRadius, BRUSH_COLOUR_ALTITUDE, floorRadius * Math.PI2, ShapeFlags.NOZBUFFER));
569 }
570
571 if (m_bIsInRemovalMode)
572 SetBrushColor(BRUSH_COLOUR_REMOVAL);
573
574 if (m_bSmiley)
575 {
576 Shape shape;
577 for (int i = 1; i < 4; i++)
578 {
579 shape = m_aBrushShapes[i];
580 shape.SetColor(0x00000000);
581 shape.SetFlags(ShapeFlags.TRANSP | ShapeFlags.NOOUTLINE);
582 }
583
584 m_aBrushShapes.Insert(CreateCircle(worldPos + { -m_fRadius * 0.4, 0, m_fRadius * 0.25 }, vector.Up, m_fRadius * 0.2, BRUSH_COLOUR_NORMAL_2D, m_fRadius * 0.25 * Math.PI2, ShapeFlags.NOZBUFFER));
585 m_aBrushShapes.Insert(CreateCircle(worldPos + { m_fRadius * 0.4, 0, m_fRadius * 0.25 }, vector.Up, m_fRadius * 0.2, BRUSH_COLOUR_NORMAL_2D, m_fRadius * 0.25 * Math.PI2, ShapeFlags.NOZBUFFER));
586 m_aBrushShapes.Insert(CreateCircleArc(worldPos, vector.Up, vector.Forward, 135, 225, m_fRadius * 0.75, BRUSH_COLOUR_NORMAL_2D, m_fRadius * Math.PI2, ShapeFlags.NOZBUFFER));
587 }
588 }
589
590 //------------------------------------------------------------------------------------------------
591 protected void SetBrushColor(int colour)
592 {
593 if (!m_aBrushShapes)
594 return; // should -not- happen...
595
596 // colour &= 0x00FFFFFF; // remove alpha
597 // colour |= 0x3F000000; // set alpha
598 m_aBrushShapes[BRUSH_SHAPE_INDEX].SetColor(colour);
599 }
600
601 //------------------------------------------------------------------------------------------------
602 protected bool IsWorldValid()
603 {
604 if (!m_API) // required for Ctrl+Shift+R reloading Tools
605 return false;
606
607 string worldPath;
608 m_API.GetWorldPath(worldPath);
609 return !worldPath.IsEmpty();
610 }
611
612 //------------------------------------------------------------------------------------------------
613 // constructor
614 protected void SCR_SelectionBrushTool()
615 {
616 m_TraceSphere = new TraceSphere();
617 m_TraceSphere.Flags = TraceFlags.ENTS; // not interested in tracing world here
618 m_TraceSphere .LayerMask = EPhysicsLayerPresets.Main;
619
620 m_bIsWorldValid = IsWorldValid();
621 }
622}
623
624[BaseContainerProps(configRoot: true)]
625class SCR_SelectionBrushConfig
626{
627 [Attribute(uiwidget: UIWidgets.ResourcePickerThumbnail, desc: "Only the listed Prefabs will be selected", params: "et")]
628 ref array<ResourceName> m_aPrefabs;
629}
630
631enum SCR_ESelectionBrushToolLayer
632{
633 ALL_LAYERS,
635 INACTIVE_LAYERS,
636}
637#endif // WORKBENCH
SCR_EAIThreatSectorFlags flags
Shape CreateCircle(vector pos, vector aroundDir, float radius, int color, int subdivisions, ShapeFlags flags)
Definition DebugShapes.c:91
Shape CreateCircleArc(vector pos, vector aroundDir, vector forwardDir, float angMin, float angMax, float radius, int color, int subdivisions, ShapeFlags flags)
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
override void OnActivate()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition Debug.c:13
proto external vector GetOrigin()
Definition Math.c:13
Instance of created debug visualizer.
Definition Shape.c:14
EPhysicsLayerPresets
Enum is filled by C++ by data in project config PhysicsSettings.LayerPresets.
Definition gameLib.c:19
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
ShapeFlags
Definition ShapeFlags.c:13
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
SCR_FieldOfViewSettings Attribute
@ CURRENT_LAYER
Current layer entity (only one entity can be current at once).
KeyCode
Definition KeyCode.c:13
TraceFlags
Definition TraceFlags.c:13
proto int ARGB(int a, int r, int g, int b)