6 bool isFixedMode =
true;
9 static int startPos[2];
10 static int startPosMultiSel[2];
18 static int Scale(
int pos)
20 if (!m_WorkspaceWidget)
21 m_WorkspaceWidget =
GetGame().GetWorkspace();
23 return m_WorkspaceWidget.DPIScale(pos);
32 startPosMultiSel = {0, 0};
42 protected float m_fPanKBMMultiplier;
45 protected float m_fPanStickMultiplier;
47 [
Attribute(defvalue:
"1", uiwidget:
UIWidgets.CheckBox,
desc:
"Enables panning by moving cursor to the screen edges")]
48 protected bool m_bEnableCursorEdgePan;
51 protected bool m_bIsCursorCenteredOnOpen;
54 protected float m_fZoomAnimTime;
56 [
Attribute(defvalue:
"2", uiwidget:
UIWidgets.EditBox,
desc:
"Each zoom step is increased/decreased by the currentZoom/thisVariable, lower number means faster steps",
params:
"0.1 10")]
57 protected float m_fZoomStrength;
59 [
Attribute(defvalue:
"100", uiwidget:
UIWidgets.EditBox,
desc:
"This is multiplier of average frame time resulting in a rotation degree value",
params:
"100 1000")]
60 protected int m_iRotateSpeedMouse;
63 protected bool m_bEnableMapCrosshairVisuals;
65 [
Attribute(defvalue:
"1", uiwidget:
UIWidgets.CheckBox,
desc:
"Enables crosshair grid coordinate display")]
66 protected bool m_bEnableCrosshairCoords;
68 [
Attribute(defvalue:
"0.01", uiwidget:
UIWidgets.EditBox,
desc:
"How precise grid display should be by multiplying current grid by this value and discarding everything that will be after the comma",
params:
"0.0001 1")]
69 protected float m_fGridPrecision;
71 [
Attribute(defvalue:
"1", uiwidget:
UIWidgets.CheckBox,
desc:
"Enables crosshair height above sea level display")]
72 protected bool m_bEnableCrosshairHeightASL;
75 protected int m_iHeightPrecision;
78 protected ref
Color m_GuidelineColor;
81 protected ref array<ref SCR_CursorVisualState> m_aCursorStatesConfig;
86 protected static bool m_bRecentlyTraced;
87 protected static ref array<Widget> s_aTracedWidgets = {};
90 protected const int MAX_GRID_COORD = 1000;
91 protected const int CURSOR_CAPTURE_OFFSET = 10;
92 protected const int GUILDING_LINE_WIDTH = 16;
93 protected const float PAN_DEFAULT_COUNTDOWN = 0.1;
94 protected const float SINGLE_SELECTION_RANGE = 50.0;
95 protected const float CIRCLE_SELECTION_RANGE = 500.0;
96 protected const float FREE_CURSOR_RESET = 3.0;
97 protected static const LocalizedString TEXT_METERS =
"#AR-ValueUnit_Short_Meters";
116 protected float m_fPanCountdown;
117 protected float m_fModifActionDelay;
118 protected float m_fZoomHoldTime;
119 protected float m_fHoverTime;
120 protected float m_fFreeCursorTime;
121 protected float m_fSelectHoldTime;
127 protected bool m_bIsInit;
129 protected bool m_bIsDraggingAvailable;
130 protected bool m_bIsSelectionAvailable;
131 protected bool m_bIsModifierActive;
132 protected bool m_bIsJournalActive;
133 protected int m_iRotationDirVal;
134 protected float m_fZoomMultiplierWheel = 1;
136 protected ref SCR_MapCursorInfo m_CursorInfo;
137 protected ref SCR_CursorCustom m_CustomCursor;
138 protected CanvasWidget m_MapWidget;
139 protected SCR_MapSelectionModule m_SelectionModule;
142 protected Widget m_wCrossGrid;
143 protected ImageWidget m_wCrossLTop;
144 protected ImageWidget m_wCrossRTop;
145 protected ImageWidget m_wCrossLBot;
146 protected ImageWidget m_wGLLeft;
147 protected ImageWidget m_wGLTop;
148 protected Widget m_wCrossMCenter;
151 protected ImageWidget m_wGLRight;
152 protected ImageWidget m_wGLBot;
153 protected ImageWidget m_wGLFadeTop;
154 protected ImageWidget m_wGLFadeLeft;
155 protected ImageWidget m_wGLFadeRight;
156 protected ImageWidget m_wGLFadeBot;
157 protected TextWidget m_wCoordText;
158 protected TextWidget m_wHeightASLText;
164 SCR_MapCursorInfo GetCursorInfo() {
return m_CursorInfo; }
172 static array<Widget> GetMapWidgetsUnderCursor()
174 if (!SCR_MapEntity.GetMapInstance().IsOpen())
176 s_aTracedWidgets.Clear();
177 return s_aTracedWidgets;
180 if (!m_bRecentlyTraced)
183 return s_aTracedWidgets;
194 m_CursorState |= state;
203 m_CursorState &= ~state;
211 if (!m_bEnableMapCrosshairVisuals)
214 SCR_CursorVisualState cursorState = GetCursorStateCfg();
217 m_CustomCursor.SetCursorVisual(null);
219 m_CustomCursor.SetCursorVisual(cursorState);
221 SetCrosshairGridVisible(!cursorState.m_DisableCursorLines);
226 protected void SetCrosshairGridVisible(
bool state)
228 if (!m_wCrossGrid || !m_bEnableMapCrosshairVisuals)
231 m_wCrossGrid.SetVisible(state);
238 m_CursorInfo.isGamepad = isGamepad;
239 if (m_CursorInfo.isGamepad)
241 else if (m_fFreeCursorTime != 0)
242 m_CustomCursor.SetOpacity(1);
247 void SetWheelZoomMultiplier(
float value)
249 m_fZoomMultiplierWheel = value;
255 void ForceCenterCursor()
257 float screenX, screenY;
258 m_MapWidget.GetScreenSize(screenX, screenY);
261 WorkspaceWidget workspace =
GetGame().GetWorkspace();
262 m_CursorInfo.x = workspace.DPIUnscale(screenX * 0.5);
263 m_CursorInfo.y = workspace.DPIUnscale(screenY * 0.5);
265 if (!m_CursorInfo.isFixedMode)
266 m_fFreeCursorTime = FREE_CURSOR_RESET;
273 protected void HandleMove()
276 if (m_CursorInfo.lastX != m_CursorInfo.x || m_CursorInfo.lastY != m_CursorInfo.y)
278 WorkspaceWidget workspace =
GetGame().GetWorkspace();
279 if (m_CursorInfo.isGamepad && workspace)
280 m_InputManager.SetCursorPosition(workspace.DPIScale(m_CursorInfo.x), workspace.DPIScale(m_CursorInfo.y));
293 protected void HandlePan(
float timeSlice)
296 if (m_CursorState & STATE_PAN_RESTRICTED)
305 if (m_CursorInfo.edgeFlags > 0 && (m_CursorState &
EMapCursorState.CS_PAN) == 0)
307 if (m_fPanCountdown == 0)
308 m_fPanCountdown = PAN_DEFAULT_COUNTDOWN;
310 float frameTime = System.GetFrameTimeS();
311 int px = (
int)(frameTime * 1000) * m_fPanKBMMultiplier;
325 if (m_fPanCountdown <= 0)
330 m_CursorInfo.startPos = {0, 0};
339 m_fPanCountdown -= timeSlice;
344 protected void HandleZoom()
358 if (m_CursorState & STATE_ZOOM_RESTRICTED)
370 protected void HandleHover(
float timeSlice)
375 m_fHoverTime += timeSlice;
377 if (m_fHoverTime >= 0.25)
379 float worldX, worldY;
381 vector curPos =
Vector(worldX, 0, worldY);
396 float worldX, worldY;
398 vector curPos =
Vector(worldX, 0, worldY);
401 if ((m_CursorState & STATE_HOVER_RESTRICTED)
415 protected void HandleSelect()
418 if (m_CursorState & STATE_SELECT_RESTRICTED)
421 vector vScreenPos =
Vector(m_CursorInfo.Scale(m_CursorInfo.x), 0, m_CursorInfo.Scale(m_CursorInfo.y));
429 float worldX, worldY;
431 vector curPos =
Vector(worldX, 0, worldY);
434 autoptr array<MapItem> selectedItems =
new array<MapItem>;
438 if (selected && (selectedItems.Count() != 1 || selectedItems[0] != selected))
454 protected void HandleMultiSelect(
bool activate)
457 if ((m_CursorState & STATE_MULTISELECT_RESTRICTED) != 0 || !activate)
465 autoptr array<MapItem> selectedItems =
new array<MapItem>;
466 GetCursorSelection(selectedItems);
467 int count = selectedItems.Count();
469 for (
int i = 0; i < count; i++)
476 m_CursorInfo.startPosMultiSel = {0, 0};
486 autoptr array<MapItem> selectedItems =
new array<MapItem>;
487 GetCursorSelection(selectedItems);
488 int count = selectedItems.Count();
490 for (
int i = 0; i < count; i++)
492 selectedItems[i].SetHighlighted(
true);
500 protected void HandleDrag(
bool startDrag)
506 if (m_CursorState & STATE_DRAG_RESTRICTED)
511 if (SCR_MapToolInteractionUI.StartDrag())
523 SCR_MapToolInteractionUI.EndDrag();
530 protected void HandleRotateTool(
bool startRotate)
532 if (m_CursorState & STATE_ROTATE_RESTRICTED)
542 if (SCR_MapToolInteractionUI.StartRotate())
551 SCR_MapToolInteractionUI.EndRotate();
558 bool HandleDraw(
bool active)
561 if (active && (m_CursorState & STATE_DRAW_RESTRICTED) == 0)
580 bool HandleSubMenu(
bool active)
583 if (active && (m_CursorState & STATE_SUBMENU_RESTRICTED) == 0)
602 bool HandleDialog(
bool active)
608 if (m_CursorInfo.isGamepad)
620 if (m_CursorInfo.isGamepad)
628 void ToggleFastTravelDestinationSelection(
bool enable)
639 void ToggleMapCommandPositiveCursor(
bool enable)
650 void ToggleMapCommandNegativeCursor(
bool enable)
659 void ToggleLocationSelection(
bool enable)
671 bool HandleContextualMenu(
bool doClose =
false)
674 if ((m_CursorState & STATE_CTXMENU_RESTRICTED) != 0 && !doClose)
703 void SetJournalVisibility(
bool isOpened)
705 m_bIsJournalActive = isOpened;
713 protected void GetCursorSelection(out array<MapItem> mapItems)
716 float startWorldX, startWorldY, worldX, worldY;
717 m_MapEntity.
ScreenToWorldNoFlip(m_CursorInfo.Scale(m_CursorInfo.startPosMultiSel[0]), m_CursorInfo.Scale(m_CursorInfo.startPosMultiSel[1]), startWorldX, startWorldY);
719 vector startPos =
Vector(startWorldX, 0, startWorldY);
720 vector curPos =
Vector(worldX, 0, worldY);
724 m_MapEntity.GetInsideRect(mapItems, startPos, curPos);
736 protected void GetCursorPosition(out
int x, out
int y)
738 WorkspaceWidget workspace =
GetGame().GetWorkspace();
743 float screenX, screenY, offX, offY;
744 m_MapWidget.GetScreenSize(screenX, screenY);
745 m_MapWidget.GetScreenPos(offX, offY);
751 if (m_CursorInfo.isGamepad)
753 fX = workspace.DPIScale(x);
754 fY = workspace.DPIScale(y);
759 WidgetManager.GetMousePos(iX, iY);
770 if (m_bEnableCursorEdgePan)
771 TestEdgePan(fX, fY, screenX, screenY);
774 x = workspace.DPIUnscale(fX);
775 y = workspace.DPIUnscale(fY);
784 protected void TestEdgePan(inout
float x, inout
float y,
int screenX,
int screenY)
786 float windowWidth, windowHeight;
787 m_MapWidget.GetScreenSize(windowWidth, windowHeight);
792 if (x <= CURSOR_CAPTURE_OFFSET)
795 m_CursorInfo.edgeFlags &= ~EMapCursorEdgePos.LEFT;
797 if (y <= CURSOR_CAPTURE_OFFSET)
800 m_CursorInfo.edgeFlags &= ~EMapCursorEdgePos.TOP;
802 if (x >= (
int)windowWidth - CURSOR_CAPTURE_OFFSET - 1)
805 m_CursorInfo.edgeFlags &= ~EMapCursorEdgePos.RIGHT;
807 if (y >= (
int)windowHeight - CURSOR_CAPTURE_OFFSET - 1)
810 m_CursorInfo.edgeFlags &= ~EMapCursorEdgePos.BOTTOM;
820 if (m_CursorState & STATE_PAN_RESTRICTED)
823 m_fPanCountdown = PAN_DEFAULT_COUNTDOWN;
831 CalculatePan(value,
EMapPanMode.HORIZONTAL, m_fPanKBMMultiplier);
838 CalculatePan(value,
EMapPanMode.VERTICAL, m_fPanKBMMultiplier);
848 CalculatePan(1,
EMapPanMode.HORIZONTAL, value * m_fPanStickMultiplier);
858 CalculatePan(1,
EMapPanMode.VERTICAL, value * m_fPanStickMultiplier);
868 if (m_CursorState & STATE_PAN_RESTRICTED)
871 m_fPanCountdown = PAN_DEFAULT_COUNTDOWN;
872 int px = (System.GetFrameTimeS() * 1000);
875 px = px * multiPlier;
877 px = -px * multiPlier;
886 if (!m_CursorInfo.isGamepad)
892 m_fFreeCursorTime = 0;
893 m_CustomCursor.SetOpacity(1);
894 m_CursorInfo.isFixedMode =
false;
897 WorkspaceWidget workspace =
GetGame().GetWorkspace();
901 maxX = workspace.DPIUnscale(maxX);
902 maxY = workspace.DPIUnscale(maxY);
905 m_CursorInfo.x = Math.Clamp(m_CursorInfo.x + value * System.GetFrameTimeS() * 1000 * m_fPanStickMultiplier, 1, maxX);
912 if (!m_CursorInfo.isGamepad)
918 m_fFreeCursorTime = 0;
919 m_CustomCursor.SetOpacity(1);
920 m_CursorInfo.isFixedMode =
false;
923 WorkspaceWidget workspace =
GetGame().GetWorkspace();
927 maxX = workspace.DPIUnscale(maxX);
928 maxY = workspace.DPIUnscale(maxY);
931 m_CursorInfo.y = Math.Clamp(m_CursorInfo.y - value * System.GetFrameTimeS() * 1000 * m_fPanStickMultiplier, 1, maxY);
938 if (Math.AbsFloat(value) < 0.001)
942 if (m_CursorState & STATE_ZOOM_RESTRICTED)
945 m_fZoomHoldTime += System.GetFrameTimeS();
946 if ((m_CursorState &
EMapCursorState.CS_ZOOM) && m_fZoomHoldTime < 0.05)
952 float zoomValue = value.Sign() * Math.Min(1, value * value) * zoomPPU / m_fZoomStrength;
963 if (Math.AbsFloat(value) < 0.001)
967 if (m_CursorState & STATE_ZOOM_RESTRICTED)
970 m_fZoomHoldTime += System.GetFrameTimeS();
971 if ((m_CursorState &
EMapCursorState.CS_ZOOM) && m_fZoomHoldTime < 0.05)
977 float zoomValue = -1 * Math.Min(1, value * value) * zoomPPU / m_fZoomStrength;
990 if (m_bIsJournalActive || m_CursorState & STATE_ZOOM_RESTRICTED)
994 value = value * m_fZoomMultiplierWheel;
1003 if (m_bIsJournalActive || m_CursorState & STATE_ZOOM_RESTRICTED)
1007 value = value * m_fZoomMultiplierWheel;
1015 if (!m_bIsDraggingAvailable)
1031 if (!m_bIsDraggingAvailable)
1050 if (!SCR_MapToolInteractionUI.s_bIsRotating)
1051 HandleRotateTool(
true);
1056 if (SCR_MapToolInteractionUI.s_bIsRotating)
1057 HandleRotateTool(
false);
1065 SCR_MapToolInteractionUI.ActivateAction();
1074 if (m_fSelectHoldTime == 0)
1075 m_CursorInfo.startPosMultiSel = {m_CursorInfo.x, m_CursorInfo.y};
1077 m_fSelectHoldTime += System.GetFrameTimeS();
1078 if (m_fSelectHoldTime < 0.2)
1081 HandleMultiSelect(
true);
1087 HandleMultiSelect(
false);
1088 m_fSelectHoldTime = 0;
1098 m_CursorInfo.startPosMultiSel = {m_CursorInfo.x, m_CursorInfo.y};
1099 HandleMultiSelect(
true);
1103 HandleMultiSelect(
false);
1127 protected SCR_CursorVisualState GetCursorStateCfg()
1131 SCR_CursorVisualState cfg;
1132 while (state != stateMin)
1134 if (m_CursorState & state)
1136 cfg = m_aCursorStatesMap.Get(state);
1149 protected void UpdateCrosshairUI()
1151 float sizeX, sizeY, cursorX, cursorY;
1152 m_wCrossMCenter.GetScreenSize(sizeX, sizeY);
1154 cursorX = m_CursorInfo.x;
1155 cursorY = m_CursorInfo.y;
1158 WorkspaceWidget workspace =
GetGame().GetWorkspace();
1159 cursorX = cursorX - workspace.DPIUnscale(sizeX)/ 2;
1160 cursorY = cursorY - workspace.DPIUnscale(sizeY)/ 2;
1162 m_CustomCursor.Update(m_CursorInfo.x, m_CursorInfo.y);
1164 m_MapWidget.GetScreenSize(sizeX, sizeY);
1166 m_wCrossLTop.SetSize(cursorX, cursorY);
1167 m_wCrossRTop.SetSize(workspace.DPIUnscale(sizeX) - cursorX, cursorY);
1168 m_wCrossLBot.SetSize(0, workspace.DPIUnscale(sizeY) - cursorY);
1169 m_wGLTop.SetSize(GUILDING_LINE_WIDTH, cursorY);
1170 m_wGLLeft.SetSize(cursorX, GUILDING_LINE_WIDTH);
1175 if (m_bEnableCrosshairHeightASL)
1177 float heightASL = Math.Round(
GetGame().GetWorld().GetSurfaceY(wX, wY) / m_iHeightPrecision) * m_iHeightPrecision;
1178 m_wHeightASLText.SetTextFormat(TEXT_METERS, heightASL.ToString(0, 0));
1181 if (m_bEnableCrosshairCoords)
1183 wX *= m_fGridPrecision;
1185 wX = MAX_GRID_COORD + wX;
1187 wY *= m_fGridPrecision;
1189 wY = MAX_GRID_COORD + wY;
1191 string posY = (Math.Floor(wY)).ToString(3, 0);
1192 string posX = (Math.Floor(wX)).ToString(3, 0);
1193 m_wCoordText.SetTextFormat(TEXT_GRID, posX, posY);
1199 protected static void TraceMapWidgets()
1201 WidgetManager.TraceWidgets(SCR_MapCursorInfo.Scale(SCR_MapCursorInfo.x), SCR_MapCursorInfo.Scale(SCR_MapCursorInfo.y), SCR_MapEntity.GetMapInstance().GetMapMenuRoot(), s_aTracedWidgets);
1202 m_bRecentlyTraced =
true;
1211 m_wCrossGrid = root.FindAnyWidget(
"CursorCrosshair");
1212 if (m_bEnableMapCrosshairVisuals)
1214 SetCrosshairGridVisible(
true);
1216 m_wCrossMCenter = m_wCrossGrid.FindAnyWidget(
"CrossMCenter");
1217 m_wCrossRTop = ImageWidget.Cast(m_wCrossGrid.FindAnyWidget(
"CrossRTop"));
1218 m_wCrossLTop = ImageWidget.Cast(m_wCrossGrid.FindAnyWidget(
"CrossLTop"));
1219 m_wCrossLBot = ImageWidget.Cast(m_wCrossGrid.FindAnyWidget(
"CrossLBot"));
1220 m_wGLTop = ImageWidget.Cast(m_wCrossGrid.FindAnyWidget(
"GLTop"));
1221 m_wGLLeft = ImageWidget.Cast(m_wCrossGrid.FindAnyWidget(
"GLLeft"));
1223 m_wGLFadeLeft = ImageWidget.Cast(m_wCrossGrid.FindAnyWidget(
"GLFadeLeft"));
1224 m_wGLRight = ImageWidget.Cast(m_wCrossGrid.FindAnyWidget(
"GLRight"));
1225 m_wGLFadeRight = ImageWidget.Cast(m_wCrossGrid.FindAnyWidget(
"GLFadeRight"));
1226 m_wGLBot = ImageWidget.Cast(m_wCrossGrid.FindAnyWidget(
"GLBot"));
1227 m_wGLFadeBot = ImageWidget.Cast(m_wCrossGrid.FindAnyWidget(
"GLFadeBot"));
1228 m_wGLFadeTop = ImageWidget.Cast(m_wCrossGrid.FindAnyWidget(
"GLFadeTop"));
1229 m_wCoordText = TextWidget.Cast(m_wCrossGrid.FindAnyWidget(
"CoordText"));
1230 m_wHeightASLText = TextWidget.Cast(m_wCrossGrid.FindAnyWidget(
"HeightText"));
1234 m_wGLTop.SetColor(m_GuidelineColor);
1235 m_wGLLeft.SetColor(m_GuidelineColor);
1236 m_wGLRight.SetColor(m_GuidelineColor);
1237 m_wGLBot.SetColor(m_GuidelineColor);
1238 m_wGLFadeTop.SetColor(m_GuidelineColor);
1239 m_wGLFadeLeft.SetColor(m_GuidelineColor);
1240 m_wGLFadeRight.SetColor(m_GuidelineColor);
1241 m_wGLFadeBot.SetColor(m_GuidelineColor);
1242 m_wCoordText.SetColor(m_GuidelineColor);
1243 m_wHeightASLText.SetColor(m_GuidelineColor);
1245 m_wCoordText.SetOpacity(0);
1247 if (m_bEnableCrosshairCoords)
1248 m_wCoordText.SetOpacity(1);
1250 if (m_bEnableCrosshairHeightASL)
1251 m_wHeightASLText.SetOpacity(1);
1255 SetCrosshairGridVisible(
false);
1259 if (!m_CustomCursor)
1260 m_CustomCursor =
new SCR_CursorCustom();
1265 protected void InitInputs()
1294 if (m_SelectionModule)
1305 m_bIsDraggingAvailable =
true;
1315 m_bIsDraggingAvailable =
false;
1321 protected void CleanupInputs()
1364 override void OnMapOpen(MapConfiguration config)
1367 m_CursorInfo =
new SCR_MapCursorInfo();
1376 if (m_bIsCursorCenteredOnOpen || m_CursorInfo.isGamepad)
1377 ForceCenterCursor();
1381 override void OnMapClose(MapConfiguration config)
1391 override void Update(
float timeSlice)
1396 m_bRecentlyTraced =
false;
1399 GetCursorPosition(m_CursorInfo.x, m_CursorInfo.y);
1403 HandleHover(timeSlice);
1404 HandlePan(timeSlice);
1408 if (m_bEnableMapCrosshairVisuals && (m_CursorState & CUSTOM_CURSOR_LOCKED) == 0)
1409 UpdateCrosshairUI();
1413 void SCR_MapCursorModule()
1415 foreach (SCR_CursorVisualState cursorState : m_aCursorStatesConfig)
1419 m_aCursorStatesMap.Insert(stateEnum, cursorState);
1427class SCR_CursorVisualState
1429 [
Attribute(
"1", UIWidgets.ComboBox,
"Configure selected cursor state",
"", ParamEnumArray.FromEnum(
EMapCursorState))]
1432 [
Attribute(
"{E75FB4134580A496}UI/Textures/Cursor/cursors.imageset", UIWidgets.ResourceNamePicker,
desc:
"Imageset selection",
params:
"imageset")]
1433 ResourceName m_sCursorIconsImageset;
1435 [
Attribute(
"default", UIWidgets.EditBox,
desc:
"imageset quad")]
1436 string m_sImageQuad;
1438 [
Attribute(
"", UIWidgets.EditBox,
desc:
"imageset quad when controller is active instead of KBM \nIf this is not defined, attibute from above is used for both cases")]
1439 string m_sImageQuadController;
1441 [
Attribute(
"0", UIWidgets.Slider,
desc:
"Padding from top, in pixels",
"-32 32 1")]
1442 float m_fPaddingTop;
1444 [
Attribute(
"0", UIWidgets.Slider,
desc:
"Padding from left, in pixels",
"-32 32 1")]
1445 float m_fPaddingLeft;
1447 [
Attribute(
"0.76 0.38 0.08 1", UIWidgets.ColorPicker,
desc:
"Cursor color")]
1450 [
Attribute(
desc:
"Cursor lines are disabled in this state if otherwise active")]
1451 bool m_DisableCursorLines;
1462 source.Get(
"m_eCursorState",
type);
ArmaReforgerScripted GetGame()
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
InputManager GetInputManager()
InputManager m_InputManager
void OnInputDeviceIsGamepad(bool isGamepad)
void SetCursorType(EEditorCursor type)
EMapPanMode
Panning modes.
EMapCursorState
Map cursor state.
EMapCursorEdgePos
Flags for when cursor is placed on screen edges.
EMapEntityMode
Mode of the map.
EMapCursorSelectType
Map cursor multiselection type.
SCR_MapEntity m_MapEntity
SCR_PossessingManagerComponentClass int
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void OnPauseMenuClosed()
PauseMenuUI Event.
void OnPauseMenuOpened()
PauseMenuUI Event.
sealed InputManager GetInputManager()
SCR_MapModuleBase GetMapModule(typename moduleType)
void Pan(EMapPanMode panMode, float panValue=0)
CanvasWidget GetMapWidget()
Get map widget.
void InvokeOnSelect(vector selectionPos)
MapConfiguration GetMapConfig()
Get map config.
MapItem GetHoveredItem()
Get hovered item.
bool IsZooming()
Get whether zoom interpolation is ongoing.
void ZoomSmooth(float targetPixPerUnit, float zoomTime=0.25, bool zoomToCenter=true, bool reinitZoom=false)
void ScreenToWorld(int screenPosX, int screenPosY, out float worldX, out float worldY)
Use scaled screen coords to get canvas world coords, flips the y-axis.
SCR_MapUIBaseComponent GetMapUIComponent(typename componentType)
float GetTargetZoomPPU()
Get target zoom in the form of PixelPerUnit value, which is different from current zoom if interpolat...
void SelectItem(MapItem item)
void HoverItem(MapItem item)
void ScreenToWorldNoFlip(int screenPosX, int screenPosY, out float worldX, out float worldY)
Use scaled screen coords to get canvas world coords without flipping the y-axis.
void ClearHover()
Clear hover state.
void ClearSelection()
Clear selected items.
void OnMapClose(MapConfiguration config)
SCR_MapEntity event.
void OnMapOpen(MapConfiguration config)
SCR_MapEntity event.
Game g_Game
Game singleton instance.
SCR_FieldOfViewSettings Attribute
class SCR_BaseManualCameraComponent _WB_GetCustomTitle(BaseContainer source, out string title)
proto native vector Vector(float x, float y, float z)