Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CursorEditorUIComponent.c
Go to the documentation of this file.
1 
4 {
5  protected const float TRACE_DIS_SINGLE = 10000;
6  protected const float TRACE_DIS_REPEATED = 250;
7 
8  //[Attribute()]
9  //private string m_sGamepadCursorWidgetName;
10 
12  private ref array<ref SCR_CursorEditor> m_Cursors;
13 
14  private ref map<EEditorCursor, ref SCR_CursorEditor> m_CursorsMap = new map<EEditorCursor, ref SCR_CursorEditor>();
15  private SCR_CursorEditor m_CurrentCursor;
16  private vector m_vGamepadCursorSize;
17  private float m_fGamepadCursorRadius;
18  private float m_fGamepadCursorRadiusSq;
19  private InputManager m_InputManager;
20  private WorkspaceWidget m_wWorkspace;
21  private SCR_EditorManagerEntity m_EditorManager;
22  private SCR_StatesEditorComponent m_StatesManager;
23  private SCR_EditableEntityComponent m_EntityUnderCursor;
24  private SCR_HoverEditableEntityFilter m_HoverManager;
25  private SCR_PreviewEntityEditorComponent m_PreviewManager;
26  private SCR_CommandActionsEditorUIComponent m_CommandManager;
27  private SCR_MapEntity m_MapEntity;
28  private IEntity m_TraceEntity;
29  //private vector m_vCursorPosRef;
30  private vector m_vCursorPos;
31  private vector m_vCursorPosWorld;
32  private vector m_vCursorPosWorldNormalized;
33  private int m_iCursorPosX;
34  private int m_iCursorPosY;
35  private bool m_bCanFocus = true;
36  private int m_iFrameIndex;
37  private int m_iFrameUpdate;
38  private int m_iFrameUpdateWorld;
39  private float m_fTargetAlpha = 1;
40  private float m_fTargetAlphaStrength;
41  private SCR_MouseAreaEditorUIComponent m_MouseArea;
42  protected TraceFlags m_DefaultWorldTraceFlags = TraceFlags.WORLD | TraceFlags.OCEAN | TraceFlags.ENTS;
43 
44  //------------------------------------------------------------------------------------------------
48  void SetCursorPos(vector pos, bool DPIScale = false)
49  {
50  if (!m_InputManager || !m_InputManager.IsUsingMouseAndKeyboard())
51  return;
52 
53  ArmaReforgerScripted game = GetGame();
54  if (!game)
55  return;
56 
57  WorkspaceWidget workspace = game.GetWorkspace();
58  if (!workspace)
59  return;
60 
61  float mouseX = pos[0];
62  float mouseY = pos[1];
63  if (DPIScale)
64  {
65  mouseX = workspace.DPIScale(mouseX);
66  mouseY = workspace.DPIScale(mouseY);
67  }
68 
69  m_InputManager.SetCursorPosition(mouseX, mouseY);
70 
71  m_iCursorPosX = mouseX;
72  m_iCursorPosY = mouseY;
73  m_vCursorPos = Vector(m_wWorkspace.DPIUnscale(m_iCursorPosX), m_wWorkspace.DPIUnscale(m_iCursorPosY), 0);
75  }
76 
77  //------------------------------------------------------------------------------------------------
80  vector GetCursorPos()
81  {
82  //--- Get cached position
84  return m_vCursorPos;
85 
87 
88  //--- Calculate new position
89  if (m_InputManager && m_InputManager.IsUsingMouseAndKeyboard())
90  {
91  WidgetManager.GetMousePos(m_iCursorPosX, m_iCursorPosY);
92  m_vCursorPos = Vector(m_wWorkspace.DPIUnscale(m_iCursorPosX), m_wWorkspace.DPIUnscale(m_iCursorPosY), 0);
93  }
94  else
95  {
96  float cursorX, cursorY;
97  //if (m_GamepadCursorWidget) m_GamepadCursorWidget.GetScreenPos(cursorX, cursorY);
98  if (m_CurrentCursor && m_CurrentCursor.GetWidget())
99  m_CurrentCursor.GetWidget().GetScreenPos(cursorX, cursorY);
100 
101  m_vCursorPos = Vector(m_wWorkspace.DPIUnscale(cursorX), m_wWorkspace.DPIUnscale(cursorY), 0) + m_vGamepadCursorSize;
102  m_iCursorPosX = cursorX;
103  m_iCursorPosY = cursorY;
104  }
105 
106  return m_vCursorPos;
107  }
108 
109  //------------------------------------------------------------------------------------------------
113  void GetCursorPos(out int posX, out int posY)
114  {
115  posX = m_iCursorPosX;
116  posY = m_iCursorPosY;
117  }
118 
119  //------------------------------------------------------------------------------------------------
125  bool GetCursorWorldPos(out vector worldPos, bool isNormalized = false, TraceFlags flags = -1)
126  {
127  //--- Get cached position
128  if (m_iFrameUpdateWorld == m_iFrameIndex && flags == m_DefaultWorldTraceFlags)
129  {
130  if (isNormalized)
131  worldPos = m_vCursorPosWorldNormalized;
132  else
133  worldPos = m_vCursorPosWorld;
134 
135  return true;
136  }
138 
139  ArmaReforgerScripted game = GetGame();
140  if (!game)
141  return false;
142 
143  WorkspaceWidget workspace = game.GetWorkspace();
144  if (!workspace)
145  return false;
146 
147  BaseWorld world = game.GetWorld();
148  if (!world)
149  return false;
150 
151  // If map is open return map cursor world position
152  SCR_MapEntity mapEntity = SCR_MapEntity.GetMapInstance();
153  if (mapEntity && mapEntity.IsOpen())
154  {
155  float worldX, worldY;
156  mapEntity.GetMapCursorWorldPosition(worldX, worldY);
157  worldPos[0] = worldX;
158  worldPos[2] = worldY;
159  worldPos[1] = world.GetSurfaceY(worldPos[0], worldPos[2]);
160 
161  m_vCursorPosWorld = worldPos;
162  m_vCursorPosWorldNormalized = worldPos;
163  return true;
164  }
165 
166  vector cursorPos = GetCursorPos();
167  vector outDir;
168  vector startPos = workspace.ProjScreenToWorld(cursorPos[0], cursorPos[1], outDir, world, -1);
169  outDir *= TRACE_DIS_SINGLE;
170 
171  //--- Use default flags
172  if (flags < 0)
173  flags = m_DefaultWorldTraceFlags;
174 
175  //--- Camera below ocean surface, don't trace ocean
176  if (startPos[1] < world.GetOceanBaseHeight())
177  flags = flags & ~TraceFlags.OCEAN;
178 
179  TraceParam trace = new TraceParam();
180  trace.Start = startPos;
181  trace.End = startPos + outDir;
182  trace.Flags = flags;
183 
184  float traceDis = world.TraceMove(trace, null);
185  if (traceDis == 1)
186  {
187  m_vCursorPosWorldNormalized = startPos + outDir * traceDis;
188  if (isNormalized)
189  {
190  worldPos = m_vCursorPosWorldNormalized;
191  return true;
192  }
193  return false;
194  }
195 
196  worldPos = startPos + outDir * traceDis;
197  if (flags == m_DefaultWorldTraceFlags)
198  {
199  //--- Cache only when default flags were used
200  m_vCursorPosWorld = worldPos;
201  m_vCursorPosWorldNormalized = worldPos;
202  }
203  return true;
204  }
205 
206  //------------------------------------------------------------------------------------------------
208  IEntity GetTraceEntity()
209  {
210  return m_TraceEntity;
211  }
212 
213  //------------------------------------------------------------------------------------------------
214  protected void SetCursorType(EEditorCursor type)
215  {
216  SCR_CursorEditor cursor;
217  if (!m_CursorsMap.Find(type, cursor))
218  {
219  Print(string.Format("Configuration for cursor %1 not found!", typename.EnumToString(EEditorCursor, type)), LogLevel.WARNING);
220  return;
221  }
222 
223  //--- Set PC cursor
224  WidgetManager.SetCursor(cursor.GetID());
225 
226  //--- Set gamepad cursor
227  float opacity = 1;
228  if (m_CurrentCursor && m_CurrentCursor.GetWidget())
229  {
230  opacity = m_CurrentCursor.GetWidget().GetOpacity();
231  m_CurrentCursor.GetWidget().SetOpacity(0);
232  }
233 
234  if (cursor.GetWidget())
235  cursor.GetWidget().SetOpacity(opacity);
236 
237  m_CurrentCursor = cursor;
238  }
239 
240  //------------------------------------------------------------------------------------------------
241  protected void ResetCursor()
242  {
243  WidgetManager.SetCursor(EEditorCursor.DEFAULT);
244  }
245 
246  //------------------------------------------------------------------------------------------------
248  float GetCursorRadius()
249  {
250  return m_fGamepadCursorRadius;
251  }
252 
253  //------------------------------------------------------------------------------------------------
255  float GetCursorRadiusSq()
256  {
258  }
259 
260  //------------------------------------------------------------------------------------------------
263  void SetCursorAlpha(float alpha, float strength = 1)
264  {
265  m_fTargetAlpha = alpha;
266  m_fTargetAlphaStrength = strength;
267  }
268 
269  //------------------------------------------------------------------------------------------------
270  protected void UpdateCursorDebug()
271  {
272  Print("Debug");
273  UpdateCursor();
274  }
275 
276  //------------------------------------------------------------------------------------------------
277  protected void UpdateCursor()
278  {
279  //--- Map is using its own custom cursors, don't overwrite them
280  if (m_MapEntity && m_MapEntity.IsOpen())
281  return;
282 
283  EEditorState editorState;
284  if (m_StatesManager)
285  editorState = m_StatesManager.GetState();
286 
287  bool isEditing = m_PreviewManager && m_PreviewManager.IsEditing();
288 
289  switch (true)
290  {
291  //case (m_InputManager && (m_InputManager.GetActionValue("ManualCameraRotateYaw") != 0 || m_InputManager.GetActionValue("ManualCameraRotatePitch") != 0)):
292  // SetCursorType(EEditorCursor.MOVE_CAMERA);
293  // break;
294 
295  case (m_StatesManager && m_EditorManager && (m_StatesManager.IsWaiting() || m_EditorManager.IsModeChangeRequested())):
296  {
297  SetCursorType(EEditorCursor.WAITING);
298  break;
299  }
300 
301  case (isEditing && !m_PreviewManager.IsChange()):
302  {
303  SetCursorType(EEditorCursor.TRANSFORM_DISABLED);
304  break;
305  }
306 
307  case (isEditing && m_PreviewManager.IsRotating()):
308  {
309  SetCursorType(EEditorCursor.ROTATE);
310  break;
311  }
312 
313  case (isEditing && (m_PreviewManager.GetTarget() || m_PreviewManager.IsFixedPosition())):
314  {
315  if (m_PreviewManager.GetTargetInteraction() == EEditableEntityInteraction.NONE)
316  SetCursorType(EEditorCursor.TRANSFORM_SNAP_DISABLED);
317  else
318  SetCursorType(EEditorCursor.TRANSFORM_SNAP);
319  break;
320  }
321 
322  case (isEditing && !m_PreviewManager.CanMoveInRoot()):
323  {
324  SetCursorType(EEditorCursor.TRANSFORM_DISABLED);
325  break;
326  }
327 
328  case (editorState == EEditorState.TRANSFORMING):
329  {
330  if (m_PreviewManager.GetVerticalMode() == EEditorTransformVertical.GEOMETRY && m_PreviewManager.GetVerticalMode() == m_PreviewManager.GetVerticalModeReal())
331  SetCursorType(EEditorCursor.TRANSFORM_GEOMETRY);
332  else
333  SetCursorType(EEditorCursor.TRANSFORM);
334  break;
335  }
336 
337  case (editorState == EEditorState.PLACING):
338  {
339  if (m_PreviewManager.GetVerticalMode() == EEditorTransformVertical.GEOMETRY && m_PreviewManager.GetVerticalMode() == m_PreviewManager.GetVerticalModeReal())
340  SetCursorType(EEditorCursor.PLACE_GEOMETRY);
341  else
342  SetCursorType(EEditorCursor.PLACE);
343  break;
344  }
345 
346  case (m_CommandManager && m_CommandManager.GetCommandState() & EEditorCommandActionFlags.WAYPOINT):
347  {
348  SetCursorType(EEditorCursor.WAYPOINT);
349  break;
350  }
351 
352  case (m_CommandManager && m_CommandManager.GetCommandState() & EEditorCommandActionFlags.OBJECTIVE):
353  {
354  SetCursorType(EEditorCursor.OBJECTIVE);
355  break;
356  }
357 
358  case (editorState == EEditorState.SELECTING && m_HoverManager && m_HoverManager.GetInteractiveEntityUnderCursor()):
359  {
360  SetCursorType(EEditorCursor.FOCUS);
361  break;
362  }
363 
364  default:
365  {
366  SetCursorType(EEditorCursor.DEFAULT);
367  }
368  }
369  }
370 
371  //------------------------------------------------------------------------------------------------
375  void OnFilterChange(EEditableEntityState state, set<SCR_EditableEntityComponent> entitiesInsert, set<SCR_EditableEntityComponent> entitiesRemove)
376  {
377  UpdateCursor();
378  }
379 
380  //------------------------------------------------------------------------------------------------
381  protected bool TraceFilter(Class target)
382  {
383  GenericEntity genericTarget = GenericEntity.Cast(target);
384  return genericTarget.FindComponent(SCR_EditableEntityComponent) != null;
385  }
386 
387  //------------------------------------------------------------------------------------------------
388  protected SCR_EditableEntityComponent TraceEntity(vector cursorPos)
389  {
390  vector outDir;
391  vector camPos = m_wWorkspace.ProjScreenToWorld(cursorPos[0], cursorPos[1], outDir, GetGame().GetWorld(), -1);
392 
393  //--- Trace cursor position
394  TraceParam trace = new TraceParam();
395  trace.Start = camPos;
396  trace.End = camPos + outDir * TRACE_DIS_REPEATED;
397  trace.Flags = TraceFlags.ENTS | TraceFlags.WORLD | TraceFlags.OCEAN;
398  float coefTrace = GetGame().GetWorld().TraceMove(trace, null);//TraceFilter);
399 
400  m_TraceEntity = trace.TraceEnt;
401 
402  //--- Ignore when there is nothing or just terrain under cursor, or when cursor is not on mouse area
403  if (!trace.TraceEnt || trace.TraceEnt.Type() == GenericTerrainEntity || !m_MouseArea.IsMouseOn())
404  return null;
405 
406  //--- Find the first editable entity in default (not editor) hierarchy
407  GenericEntity genericEntity = GenericEntity.Cast(trace.TraceEnt);
408  while (genericEntity)
409  {
410  SCR_EditableEntityComponent entity = SCR_EditableEntityComponent.Cast(genericEntity.FindComponent(SCR_EditableEntityComponent));
411  if (entity)
412  return entity;
413 
414  genericEntity = GenericEntity.Cast(genericEntity.GetParent());
415  }
416 
417  return null;
418  }
419 
420  //------------------------------------------------------------------------------------------------
421  protected void OnInputDeviceIsGamepad(bool isGamepad)
422  {
423  // use InputManager! instead of ShowCursor
424  //ShowCursor(!isGamepad);
425  }
426 
427  //------------------------------------------------------------------------------------------------
428  protected void OnMenuUpdate(float tDelta)
429  {
430  //if (!GetWidget().IsEnabledInHierarchy()) return;
431  m_iFrameIndex++;
432 
433  if ((!m_MouseArea || m_MouseArea.IsMouseOn()) && (!m_MapEntity || !m_MapEntity.IsOpen()))
434  {
435  m_InputManager.ActivateContext("EditorMouseAreaContext");
436 
437  SCR_EditableEntityComponent entityUnderCursor = TraceEntity(GetCursorPos());
438  if (m_HoverManager && !m_HoverManager.GetEntityUnderCursorCandidate())
439  m_HoverManager.SetEntityUnderCursor(entityUnderCursor);
440  }
441 
442  if (!m_CurrentCursor)
443  return;
444 
445  Widget currentCursorWidget = m_CurrentCursor.GetWidget();
446  if (!currentCursorWidget)
447  return;
448 
449  float currentAlpha = currentCursorWidget.GetOpacity();
450  if (currentAlpha != m_fTargetAlpha)
451  currentCursorWidget.SetOpacity(Math.Lerp(currentAlpha, m_fTargetAlpha, m_fTargetAlphaStrength * tDelta));
452  }
453 
454  //------------------------------------------------------------------------------------------------
456  void OnMapToggled(MapConfiguration config)
457  {
458  UpdateCursor();
459  }
460 
461  //------------------------------------------------------------------------------------------------
462  override void HandlerAttachedScripted(Widget w)
463  {
464  super.HandlerAttachedScripted(w);
465  if (SCR_Global.IsEditMode()) return; //--- Run-time only
466 
467  MenuRootBase menu = GetMenu();
468  if (!menu)
469  return;
470 
471  m_wWorkspace = GetGame().GetWorkspace();
472  m_InputManager = GetGame().GetInputManager();
473  m_MapEntity = SCR_MapEntity.GetMapInstance();
474 
475 // if (m_InputManager)
476 // {
477 // m_InputManager.AddActionListener("ManualCameraRotateYaw", EActionTrigger.PRESSED, UpdateCursor);
478 // m_InputManager.AddActionListener("ManualCameraRotateYaw", EActionTrigger.UP, UpdateCursor);
479 // m_InputManager.AddActionListener("ManualCameraRotatePitch", EActionTrigger.PRESSED, UpdateCursor);
480 // m_InputManager.AddActionListener("ManualCameraRotatePitch", EActionTrigger.UP, UpdateCursor);
481 // }
482 
483  GetGame().OnInputDeviceIsGamepadInvoker().Insert(OnInputDeviceIsGamepad);
484 
485  SCR_MapEntity.GetOnMapOpen().Insert(OnMapToggled);
486  SCR_MapEntity.GetOnMapClose().Insert(OnMapToggled);
487 
489  if (m_EditorManager)
490  m_EditorManager.GetOnModeChangeRequest().Insert(UpdateCursor);
491 
493  if (m_StatesManager)
494  {
495  m_StatesManager.GetOnStateChange().Insert(UpdateCursor);
496  m_StatesManager.GetOnIsWaitingChange().Insert(UpdateCursor);
497  }
498 
500  if (m_PreviewManager)
501  {
502  m_PreviewManager.GetOnPreviewCreate().Insert(UpdateCursor);
503  m_PreviewManager.GetOnPreviewChange().Insert(UpdateCursor);
504  m_PreviewManager.GetOnPreviewDelete().Insert(UpdateCursor);
505  m_PreviewManager.GetOnTargetChange().Insert(UpdateCursor);
506  }
507 
508  //--- Track selecting
510  if (entitiesManager)
511  {
512  m_HoverManager = SCR_HoverEditableEntityFilter.Cast(entitiesManager.GetFilter(EEditableEntityState.HOVER));
513  if (m_HoverManager)
514  m_HoverManager.GetOnChanged().Insert(OnFilterChange);
515  }
516 
517  //--- Track commanding
519  if (m_CommandManager)
520  m_CommandManager.GetOnCommandStateChange().Insert(UpdateCursor);
521 
522  m_MouseArea = SCR_MouseAreaEditorUIComponent.Cast(GetRootComponent().FindComponent(SCR_MouseAreaEditorUIComponent));
523 
524  //--- Map all cursors
525  foreach (SCR_CursorEditor cursor: m_Cursors)
526  {
527  cursor.InitWidget(w);
528  m_CursorsMap.Insert(cursor.GetType(), cursor);
529  }
530 
531  //--- Set default cursor
532  SCR_CursorEditor defaultCursor;
533  if (m_CursorsMap.Find(EEditorCursor.DEFAULT, defaultCursor))
534  {
535  SetCursorType(EEditorCursor.DEFAULT);
536  if (defaultCursor.GetWidget())
537  {
538  vector alignment = FrameSlot.GetAlignment(defaultCursor.GetWidget());
539  m_vGamepadCursorSize = FrameSlot.GetSize(defaultCursor.GetWidget());
540  m_vGamepadCursorSize[0] = m_vGamepadCursorSize[0] * alignment[0];
541  m_vGamepadCursorSize[1] = m_vGamepadCursorSize[1] * alignment[1];
542  m_fGamepadCursorRadius = Math.Max(m_vGamepadCursorSize[0], m_vGamepadCursorSize[1]);
543  m_fGamepadCursorRadiusSq = Math.Pow(m_fGamepadCursorRadius, 2);
544  }
545  }
546  else
547  {
548  Print("Default cursor settings not found!", LogLevel.ERROR);
549  }
550 
551  MenuRootComponent rootComponent = MenuRootComponent.GetRootOf(w);
552  menu.GetOnMenuFocusLost().Insert(UpdateCursor);
553  menu.GetOnMenuHide().Insert(UpdateCursor);
554  menu.GetOnMenuUpdate().Insert(OnMenuUpdate);
555  }
556 
557  //------------------------------------------------------------------------------------------------
558  override void HandlerDeattached(Widget w)
559  {
560  super.HandlerDeattached(w);
561 
562  ResetCursor();
563 
564 // if (m_InputManager)
565 // {
566 // m_InputManager.RemoveActionListener("ManualCameraRotateYaw", EActionTrigger.PRESSED, UpdateCursor);
567 // m_InputManager.RemoveActionListener("ManualCameraRotateYaw", EActionTrigger.UP, UpdateCursor);
568 // m_InputManager.RemoveActionListener("ManualCameraRotatePitch", EActionTrigger.PRESSED, UpdateCursor);
569 // m_InputManager.RemoveActionListener("ManualCameraRotatePitch", EActionTrigger.UP, UpdateCursor);
570 // }
571 
573  GetGame().OnInputDeviceIsGamepadInvoker().Remove(OnInputDeviceIsGamepad);
574 
575  SCR_MapEntity.GetOnMapOpen().Remove(OnMapToggled);
576  SCR_MapEntity.GetOnMapClose().Remove(OnMapToggled);
577 
578  if (m_EditorManager)
579  m_EditorManager.GetOnModeChangeRequest().Remove(UpdateCursor);
580 
581  if (m_HoverManager)
582  m_HoverManager.GetOnChanged().Remove(OnFilterChange);
583 
584  if (m_PreviewManager)
585  {
586  m_PreviewManager.GetOnPreviewCreate().Remove(UpdateCursor);
587  m_PreviewManager.GetOnPreviewChange().Remove(UpdateCursor);
588  m_PreviewManager.GetOnPreviewDelete().Remove(UpdateCursor);
589  m_PreviewManager.GetOnTargetChange().Remove(UpdateCursor);
590  }
591 
592  if (m_StatesManager)
593  {
594  m_StatesManager.GetOnStateChange().Remove(UpdateCursor);
595  m_StatesManager.GetOnIsWaitingChange().Remove(UpdateCursor);
596  }
597 
599  if (transformingManager)
600  transformingManager.GetOnTransformationStart().Remove(UpdateCursor);
601 
602  if (m_CommandManager)
603  m_CommandManager.GetOnCommandStateChange().Remove(UpdateCursor);
604 
605  MenuRootBase menu = GetMenu();
606  if (menu)
607  {
608  menu.GetOnMenuFocusLost().Remove(UpdateCursor);
609  menu.GetOnMenuHide().Remove(UpdateCursor);
610  menu.GetOnMenuUpdate().Remove(OnMenuUpdate);
611  }
612  }
613 }
614 
616 class SCR_CursorEditor
617 {
618  [Attribute("0", UIWidgets.ComboBox, "", enums: ParamEnumArray.FromEnum(EEditorCursor))]
619  private EEditorCursor m_Type;
620 
621  [Attribute()]
622  private string m_sName;
623 
624  private Widget m_wWidget;
625 
626  //------------------------------------------------------------------------------------------------
629  {
630  return m_Type;
631  }
632 
633  //------------------------------------------------------------------------------------------------
635  int GetID()
636  {
637  return m_Type;
638  }
639 
640  //------------------------------------------------------------------------------------------------
642  string GetName()
643  {
644  return m_sName;
645  }
646 
647  //------------------------------------------------------------------------------------------------
649  Widget GetWidget()
650  {
651  return m_wWidget;
652  }
653 
654  //------------------------------------------------------------------------------------------------
657  void InitWidget(Widget root)
658  {
659  if (m_sName.IsEmpty())
660  return;
661 
662  m_wWidget = root.FindAnyWidget(m_sName);
663  if (m_wWidget)
664  m_wWidget.SetOpacity(0);
665  else
666  Print(string.Format("Gamepad cursor '%1' for type %2 not found!", m_sName, m_Type), LogLevel.ERROR);
667  }
668 }
m_MouseArea
private SCR_MouseAreaEditorUIComponent m_MouseArea
Definition: SCR_CursorEditorUIComponent.c:38
EEditableEntityState
EEditableEntityState
Definition: EEditableEntityState.c:37
TRACE_DIS_REPEATED
const protected float TRACE_DIS_REPEATED
Definition: SCR_CursorEditorUIComponent.c:3
EEditableEntityInteraction
EEditableEntityInteraction
Type of suggested interaction when hovering edited entity on top of another entity.
Definition: EEditableEntityInteraction.c:5
SCR_CursorEditorUIComponent
Definition: SCR_CursorEditorUIComponent.c:3
m_MapEntity
protected SCR_MapEntity m_MapEntity
Definition: SCR_MapGadgetComponent.c:14
m_InputManager
protected InputManager m_InputManager
Definition: SCR_BaseManualCameraComponent.c:15
GetType
override EGadgetType GetType()
Definition: SCR_CampaignBuildingGadgetToolComponent.c:52
GetName
string GetName()
Definition: SCR_ScenarioFrameworkLayerBase.c:85
m_TraceEntity
private IEntity m_TraceEntity
Definition: SCR_CursorEditorUIComponent.c:25
m_CommandManager
private SCR_CommandActionsEditorUIComponent m_CommandManager
Definition: SCR_CursorEditorUIComponent.c:23
m_fTargetAlphaStrength
private float m_fTargetAlphaStrength
Definition: SCR_CursorEditorUIComponent.c:37
m_StatesManager
private SCR_StatesEditorComponent m_StatesManager
Definition: SCR_AttributesManagerEditorComponent.c:65
m_iFrameIndex
private int m_iFrameIndex
Definition: SCR_CursorEditorUIComponent.c:33
EEditorState
EEditorState
Unique editor state.
Definition: EEditorState.c:5
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
m_PreviewManager
private SCR_PreviewEntityEditorComponent m_PreviewManager
Definition: SCR_CursorEditorUIComponent.c:22
m_iFrameUpdateWorld
private int m_iFrameUpdateWorld
Definition: SCR_CursorEditorUIComponent.c:35
SCR_EntitiesManagerEditorComponent
Definition: SCR_EntitiesManagerEditorComponent.c:13
m_fGamepadCursorRadiusSq
private float m_fGamepadCursorRadiusSq
Definition: SCR_CursorEditorUIComponent.c:15
m_iCursorPosY
private int m_iCursorPosY
Definition: SCR_CursorEditorUIComponent.c:31
GenericEntity
SCR_GenericBoxEntityClass GenericEntity
m_CursorsMap
private ref map< EEditorCursor, ref SCR_CursorEditor > m_CursorsMap
Definition: SCR_CursorEditorUIComponent.c:11
EEditorTransformVertical
EEditorTransformVertical
Vertical transformation mode.
Definition: EEditorTransformVertical.c:5
SCR_TransformingEditorComponent
Definition: SCR_TransformingEditorComponent.c:33
m_DefaultWorldTraceFlags
protected TraceFlags m_DefaultWorldTraceFlags
Definition: SCR_CursorEditorUIComponent.c:39
GetMenu
SCR_RadialMenu GetMenu()
Definition: SCR_RadialMenuGameModeComponent.c:41
m_HoverManager
SCR_BaseActionsEditorComponentClass m_HoverManager
Attribute
typedef Attribute
Post-process effect of scripted camera.
m_fGamepadCursorRadius
private float m_fGamepadCursorRadius
Definition: SCR_CursorEditorUIComponent.c:14
MenuRootBase
Definition: MenuRootBase.c:6
SCR_MouseAreaEditorUIComponent
Definition: SCR_MouseAreaEditorUIComponent.c:3
GetID
int GetID()
Definition: SCR_AmbientPatrolSpawnPointComponent.c:65
m_Type
protected EEditableEntityType m_Type
Definition: SCR_EntitiesToolbarEditorUIComponent.c:3
EEditorCommandActionFlags
EEditorCommandActionFlags
Simplified action conditions.
Definition: EEditorCommandActionFlags.c:5
SCR_MapEntity
Map entity.
Definition: SCR_MapEntity.c:20
SCR_HoverEditableEntityFilter
Definition: SCR_HoverEditableEntityFilter.c:6
m_EditorManager
protected SCR_EditorManagerEntity m_EditorManager
Definition: SCR_VotingEditor.c:5
m_CurrentCursor
private SCR_CursorEditor m_CurrentCursor
Definition: SCR_CursorEditorUIComponent.c:12
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_BaseEditorUIComponent
Definition: SCR_BaseEditorUIComponent.c:3
MenuRootComponent
Definition: MenuRootComponent.c:6
SCR_Global
Definition: Functions.c:6
m_vCursorPosWorldNormalized
private vector m_vCursorPosWorldNormalized
Definition: SCR_CursorEditorUIComponent.c:29
m_iFrameUpdate
private int m_iFrameUpdate
Definition: SCR_CursorEditorUIComponent.c:34
TRACE_DIS_SINGLE
const protected float TRACE_DIS_SINGLE
Definition: SCR_CursorEditorUIComponent.c:2
type
EDamageType type
Definition: SCR_DestructibleTreeV2.c:32
m_vCursorPosWorld
private vector m_vCursorPosWorld
Definition: SCR_CursorEditorUIComponent.c:28
SCR_StatesEditorComponent
Definition: SCR_StatesEditorComponent.c:9
SCR_BaseContainerCustomTitleEnum
SCR_CursorEditorUIComponent SCR_BaseEditorUIComponent SCR_BaseContainerCustomTitleEnum(EEditorCursor, "m_Type")
Definition: SCR_CursorEditorUIComponent.c:615
EEditorCursor
EEditorCursor
Editor cursor type. Values must match cursor IDs in gproj!
Definition: EEditorCursor.c:5
m_fTargetAlpha
private float m_fTargetAlpha
Definition: SCR_CursorEditorUIComponent.c:36
m_sName
protected LocalizedString m_sName
Definition: SCR_GroupIdentityComponent.c:19
SCR_CommandActionsEditorUIComponent
Definition: SCR_CommandActionsEditorUIComponent.c:1
OnInputDeviceIsGamepadInvoker
ScriptInvoker OnInputDeviceIsGamepadInvoker()
Definition: game.c:246
m_vGamepadCursorSize
private vector m_vGamepadCursorSize
Definition: SCR_CursorEditorUIComponent.c:13
GetWidget
protected Widget GetWidget()
Definition: SCR_VonDisplay.c:155
m_vCursorPos
private vector m_vCursorPos
Definition: SCR_CursorEditorUIComponent.c:27
m_iCursorPosX
private int m_iCursorPosX
Definition: SCR_CursorEditorUIComponent.c:30
m_wWorkspace
private WorkspaceWidget m_wWorkspace
Definition: SCR_CursorEditorUIComponent.c:17
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
SCR_PreviewEntityEditorComponent
Definition: SCR_PreviewEntityEditorComponent.c:12
SCR_EditorManagerEntity
Definition: SCR_EditorManagerEntity.c:26