32 m_wLine =
GetGame().GetWorkspace().CreateWidgets(
"{E8850FCD9219C411}UI/layouts/Map/MapDrawLine.layout", mapFrame);
35 Widget deleteButtonFrame =
GetGame().GetWorkspace().CreateWidgets(
"{F486FAEEA00A5218}UI/layouts/Map/MapLineDeleteButton.layout", mapFrame);
36 if (!deleteButtonFrame)
77 array<Widget> tracedW = SCR_MapCursorModule.GetMapWidgetsUnderCursor();
78 foreach (
Widget w : tracedW)
104 GetGame().GetWorkspace().SetFocusedWidget(w);
111 GetGame().GetWorkspace().SetFocusedWidget(null);
156 int screenX, screenY, endX, endY;
173 lineVector = lineVector *
m_MapEntity.GetCurrentZoom();
175 float length = workspace.DPIUnscale(lineVector.Length());
179 FrameSlot.SetPos(
m_wLine, workspace.DPIUnscale(screenX), workspace.DPIUnscale(screenY));
181 lineVector[0] = workspace.DPIUnscale((screenX + endX) * 0.5);
182 lineVector[1] = workspace.DPIUnscale((screenY + endY) * 0.5);
201 [
Attribute(
"editor", UIWidgets.EditBox,
desc:
"Toolmenu imageset quad name")]
202 protected string m_sToolMenuIconName;
217 protected ref array<ref MapLine>
m_aLines =
new array <ref MapLine>();
229 return cursorInfo && cursorInfo.isGamepad;
283 m_aLines[i].SetButtonVisible(
false);
333 if (
m_CursorModule.GetCursorState() & SCR_MapCursorModule.STATE_DRAW_RESTRICTED)
373 protected void OnMapPan(
float x,
float y,
bool adjustedPan)
415 super.OnMapOpen(config);
428 m_aLines[i].SetButtonVisible(
false);
449 super.OnMapClose(config);
ArmaReforgerScripted GetGame()
ref array< string > angles
InputManager GetInputManager()
EMapEntityMode
Mode of the map.
void OnEntryToggled(SCR_MapToolEntry entry)
SCR_MapToolEntry m_ToolMenuEntry
Widget m_wDrawingContainer
void OnMapModifierClick(float value, EActionTrigger reason)
void ToggleDrawMode()
Toggle draw mode.
SCR_MapCursorModule m_CursorModule
SCR_ButtonImageComponent m_DeleteButtonComp
void UpdateLine(bool updateEndPos)
void MapLine(SCR_MapEntity mapEnt, SCR_MapDrawingUI ownerComp)
ref array< ref MapLine > m_aLines
SCR_MapDrawingUI m_OwnerComponent
bool m_bActivationThrottle
void OnInputQuickBind(float value, EActionTrigger reason)
void OnMapClick(float value, EActionTrigger reason)
void OnMapPan(float x, float y, bool adjustedPan)
void OnMapPanEnd(float x, float y)
void SetDrawMode(bool state, bool cacheDrawn=false)
SCR_MapEntity m_MapEntity
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
ButtonWidget m_wDeleteButton
void MapLine(SCR_MapEntity mapEnt, SCR_MapDrawingUI ownerComp)
void UpdateLine(bool updateEndPos)
void OnMouseLeave(Widget w)
static const ref Color BUTTON_RED
SCR_MapEntity m_MapEntity
SCR_MapDrawingUI m_OwnerComponent
void OnButtonFocusLost(Widget w)
void DestroyLine(bool cacheDrawn=false)
void CreateLine(notnull Widget rootW, bool drawStart=false)
SCR_ButtonImageComponent m_DeleteButtonComp
void SetButtonVisible(bool target)
void OnMouseEnter(Widget w)
Map tool menu entry data class.
static ScriptInvoker GetOnEntryToggledInvoker()
void OnMapOpen(MapConfiguration config)
void OnMapClose(MapConfiguration config)
void Init()
Init method for cases where all modules and components should be loaded already so constructor cannot...
ScriptCallQueue Class provide "lazy" calls - when we don't want to execute function immediately but l...
SCR_FieldOfViewSettings Attribute