Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CursorEditorUIComponent.c
Go to the documentation of this file.
2
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
11 [Attribute()]
12 private ref array<ref SCR_CursorEditor> m_Cursors;
13
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;
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);
74 m_iFrameUpdate = m_iFrameIndex + 1;
75 }
76
77 //------------------------------------------------------------------------------------------------
81 {
82 //--- Get cached position
83 if (m_iFrameUpdate == m_iFrameIndex)
84 return m_vCursorPos;
85
86 m_iFrameUpdate = m_iFrameIndex;
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 }
109 //------------------------------------------------------------------------------------------------
113 void GetCursorPos(out int posX, out int posY)
114 {
115 posX = m_iCursorPosX;
116 posY = m_iCursorPosY;
117 }
118
119 //------------------------------------------------------------------------------------------------
120 //! Get world position below cursor.
121 //! \param[out] worldPos Vector to be filled with world position
122 //! \param[in] isNormalized
123 //! \param[in] flags Trace flags to be used (send -1 for default flags)
124 //! \return True if the cursor is above world position (e.g., not pointing at sky)
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 }
137 m_iFrameUpdateWorld = m_iFrameIndex;
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
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)
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;
198 {
199 //--- Cache only when default flags were used
200 m_vCursorPosWorld = worldPos;
201 m_vCursorPosWorldNormalized = worldPos;
202 }
203 return true;
204 }
205
206 //------------------------------------------------------------------------------------------------
207
210 return m_TraceEntity;
211 }
212
213 //------------------------------------------------------------------------------------------------
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);
237 m_CurrentCursor = cursor;
238 }
239
240 //------------------------------------------------------------------------------------------------
241 protected void ResetCursor()
242 {
243 WidgetManager.SetCursor(EEditorCursor.DEFAULT);
244 }
245
246 //------------------------------------------------------------------------------------------------
247
249 {
250 return m_fGamepadCursorRadius;
251 }
252
253 //------------------------------------------------------------------------------------------------
254
256 {
257 return m_fGamepadCursorRadiusSq;
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 {
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 {
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
343 break;
344 }
345
346 case (m_CommandManager && m_CommandManager.GetCommandState() & EEditorCommandActionFlags.WAYPOINT):
347 {
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 {
361 break;
362 }
363
364 default:
365 {
367 }
368 }
369 }
371 //------------------------------------------------------------------------------------------------
374
375 void OnFilterChange(EEditableEntityState state, set<SCR_EditableEntityComponent> entitiesInsert, set<SCR_EditableEntityComponent> entitiesRemove)
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 //------------------------------------------------------------------------------------------------
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 {
411 if (entity)
412 return entity;
413
414 genericEntity = GenericEntity.Cast(genericEntity.GetParent());
415 }
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
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 //------------------------------------------------------------------------------------------------
455
458 UpdateCursor();
459 }
460
461 //------------------------------------------------------------------------------------------------
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
487
488 m_EditorManager = SCR_EditorManagerEntity.GetInstance();
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
518 m_CommandManager = SCR_CommandActionsEditorUIComponent.Cast(GetRootComponent().FindComponent(SCR_CommandActionsEditorUIComponent));
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 {
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
552 menu.GetOnMenuFocusLost().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
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
616class 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 //------------------------------------------------------------------------------------------------
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}
SCR_EAIThreatSectorFlags flags
ref DSGameConfig game
Definition DSConfig.c:81
ArmaReforgerScripted GetGame()
Definition game.c:1398
ScriptInvoker OnInputDeviceIsGamepadInvoker()
Definition game.c:238
override string GetID(string fileName, string varName, array< BaseContainer > objects, array< int > indexes)
override EGadgetType GetType()
void OnMenuUpdate(float tDelta)
SCR_CursorEditorUIComponent SCR_BaseEditorUIComponent SCR_BaseContainerCustomTitleEnum(EEditorCursor, "m_Type")
void UpdateCursor()
EDamageType type
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
EEditableEntityType m_Type
LocalizedString m_sName
SCR_RadialMenu GetMenu()
Widget GetWidget()
Widget m_wWidget
Super root of all classes in Enforce script.
Definition Types.c:35
proto external Managed FindComponent(typename typeName)
proto external IEntity GetParent()
Input management system for user interactions.
Definition Math.c:13
ScriptInvoker GetOnMenuUpdate()
ScriptInvoker GetOnMenuFocusLost()
ScriptInvoker GetOnMenuHide()
static MenuRootComponent GetRootOf(Widget widget)
bool GetCursorWorldPos(out vector worldPos, bool isNormalized=false, TraceFlags flags=-1)
void SetCursorPos(vector pos, bool DPIScale=false)
override void HandlerAttachedScripted(Widget w)
void GetCursorPos(out int posX, out int posY)
void SetCursorAlpha(float alpha, float strength=1)
SCR_EditableEntityComponent TraceEntity(vector cursorPos)
void OnMapToggled(MapConfiguration config)
void OnFilterChange(EEditableEntityState state, set< SCR_EditableEntityComponent > entitiesInsert, set< SCR_EditableEntityComponent > entitiesRemove)
SCR_BaseEditableEntityFilter GetFilter(EEditableEntityState state, bool showError=false)
static bool IsEditMode()
Definition Functions.c:1566
static ScriptInvokerBase< MapConfigurationInvoker > GetOnMapClose()
Get on map close invoker.
void GetMapCursorWorldPosition(out float worldX, out float worldY)
bool IsOpen()
Check if the map is opened.
static ScriptInvokerBase< MapConfigurationInvoker > GetOnMapOpen()
Get on map open invoker.
static SCR_MapEntity GetMapInstance()
Get map entity instance.
Definition Types.c:486
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
EEditableEntityState
SCR_FieldOfViewSettings Attribute
EEditorTransformVertical
Vertical transformation mode.
EEditorState
Unique editor state.
Definition EEditorState.c:6
EEditableEntityInteraction
Type of suggested interaction when hovering edited entity on top of another entity.
EEditorCommandActionFlags
Simplified action conditions.
SCR_CursorEditorUIComponent SCR_BaseEditorUIComponent BaseContainerProps()
EEditorCursor
Editor cursor type. Values must match cursor IDs in gproj!
proto native vector Vector(float x, float y, float z)
TraceFlags
Definition TraceFlags.c:13