15 [
Attribute(
desc:
"When true, multi-selection operations are enabled (e.g., selection frame or Ctrl+A).", defvalue:
"1")]
18 [
Attribute(
desc:
"Name of a widget representing setting selection with mouse & keyboard.")]
21 [
Attribute(
desc:
"Name of a widget representing toggling selection with mouse & keyboard.")]
24 [
Attribute(
desc:
"Name of a widget representing setting selection with gamepad.")]
27 [
Attribute(
desc:
"Name of a widget representing toggling selection with gamepad.")]
30 [
Attribute(
"1",
desc:
"Initial size of multi-selection widget, measured as a coefficient of default cursor widget size (1 = same size).")]
36 [
Attribute(
desc:
"Curve defining how will gamepad selection widget expand.", defvalue:
"0 0 1 1", uiwidget:
UIWidgets.CurveDialog,
params:
"1 1 0 0")]
118 set<SCR_EditableEntityComponent> focused =
new set<SCR_EditableEntityComponent>();
122 if (focused.Count() > 1)
127 else if (!focused.IsEmpty())
129 set<SCR_EditableEntityComponent> selected =
new set<SCR_EditableEntityComponent>();
132 if (selected.Contains(focused[0]))
148 set<SCR_EditableEntityComponent> focused =
new set<SCR_EditableEntityComponent>();
152 if (!focused.IsEmpty())
169 set<SCR_EditableEntityComponent> focused =
new set<SCR_EditableEntityComponent>();
173 if (!focused.IsEmpty())
198 set<SCR_EditableEntityComponent> entities =
new set<SCR_EditableEntityComponent>();
200 if (entities.IsEmpty())
206 set<SCR_EditableEntityComponent> selectEntities =
new set<SCR_EditableEntityComponent>();
213 if (!entity.GetPos(posWorld))
217 if (posScreen[2] > 0 && posScreen[0] > 0 && posScreen[0] < screenW && posScreen[1] > 0 && posScreen[1] < screenH)
218 selectEntities.Insert(entity);
223 if (!selectEntities.IsEmpty())
330 set<SCR_EditableEntityComponent> entitiesInside =
new set<SCR_EditableEntityComponent>();
331 set<SCR_EditableEntityComponent> entities =
new set<SCR_EditableEntityComponent>();
372 protected bool DrawFrameMouseAndKeyboard(set<SCR_EditableEntityComponent> entities, out set<SCR_EditableEntityComponent> entitiesInside)
383 float xMax = cursorPos[0];
384 float yMax = cursorPos[1];
419 vector worldPos, screenPos;
425 if (!entity.GetPos(worldPos))
429 if (screenPos[2] > 0 && screenPos[0] > xMin && screenPos[0] < xMax && screenPos[1] > yMin && screenPos[1] < yMax)
435 entitiesInside.Insert(entity);
445 protected bool DrawFrameController(set<SCR_EditableEntityComponent> entities, out set<SCR_EditableEntityComponent> entitiesInside)
464 widgetHide.SetVisible(
false);
468 float cursorRadius = 0;
473 FrameSlot.SetPos(widgetShow, cursorPos[0], cursorPos[1]);
475 widgetShow.SetVisible(
true);
476 widgetShow.SetOpacity(1);
497 if (!entity.GetPos(worldPos))
501 if (screenPos[2] > 0 &&
vector.DistanceSq(cursorPos, screenPos) <
size)
507 entitiesInside.Insert(entity);
531 set<SCR_EditableEntityComponent> selected =
new set<SCR_EditableEntityComponent>();
648 float opacity =
Math.Lerp(frameWidget.GetOpacity(), 0, 32 * tDelta);
654 frameWidget.SetOpacity(opacity);
671 Widget widget = root.FindWidget(name);
672 if (widget && !name.IsEmpty())
674 widget.SetVisible(
false);
679 Print(
string.Format(
"Selection frame widget '%1' not found!", name),
LogLevel.ERROR);
772 super.HandlerAttachedScripted(w);
886 super.HandlerDeattached(w);
ArmaReforgerScripted GetGame()
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
bool IsOpen()
Check if the map is opened.
static SCR_MapEntity GetMapInstance()
Get map entity instance.
void EditorLoadSelection7()
void DrawFrameUp(bool isToggle)
string m_sSfxSelectEntities
string m_sGamepadSetSelectionWidgetName
string m_sGamepadToggleSelectionWidgetName
void EditorSaveSelection5()
void OnCurrentLayerChange(SCR_EditableEntityComponent currentLayer, SCR_EditableEntityComponent prevLayer)
void EditorDrawSetSelectionDown(float value, EActionTrigger reason)
void EditorTeleportSelection5()
void EditorTeleportSelection7()
void EditorTeleportSelection2()
ref Curve m_GamepadSelectionCurve
void EditorTeleportSelection0()
void EditorTeleportSelection6()
void EditorDrawSetSelectionUp(float value, EActionTrigger reason)
Widget GetFrameWidget(Widget root, string name)
bool m_bIsDrawingFrameConfirmed
EEditableEntityState m_UnselectedState
State in which entities are unselected.
void EditorClearSelection(float value=1, EActionTrigger reason=EActionTrigger.DOWN)
void EditorLoadSelection4()
void EditorSaveSelection1()
bool m_bEnableMultiSelection
bool m_bIsDrawingFrameCancelled
string m_sSfxToggleSingleEntity_Off
void EditorSaveSelection3()
bool m_bIsDrawingFrameIsToggle
float m_fSelectionFrameDuration
override void HandlerDeattached(Widget w)
static const float FRAME_DURATION_MIN
How long must the button bepressed for frame selection to behin (controller).
void EditorAddSelection(float value=1, EActionTrigger reason=EActionTrigger.DOWN)
void EditorLoadSelection(int index)
void EditorDrawSetSelectionPressed(float value, EActionTrigger reason)
void EditorSelectAll(float value=1, EActionTrigger reason=EActionTrigger.DOWN)
void EditorLoadSelection5()
void EditorSaveSelection4()
bool m_bIsDrawingFrameDisabled
void EditorLoadSelection6()
bool DrawFrameMouseAndKeyboard(set< SCR_EditableEntityComponent > entities, out set< SCR_EditableEntityComponent > entitiesInside)
SCR_BaseEditableEntityFilter m_UnselectedManager
string m_sSfxStartDrawingSelectionFrame_Gamepad
Widget m_ToggleSelectionWidget
SCR_HoverEditableEntityFilter m_HoverManager
void EditorSaveSelection7()
void EditorTeleportSelection8()
SCR_SelectedEditableEntityFilter m_SelectedManager
string m_sToggleSelectionWidgetName
void EditorSaveSelection0()
string m_sSfxToggleSingleEntity_On
void EditorLoadSelection0()
SCR_CursorEditorUIComponent m_CursorComponent
void EditorSaveSelection(int index)
void DrawFramePressed(bool isToggle)
SCR_BaseEditableEntityFilter m_FocusedManager
void EditorDrawSelectionCancel(float value, EActionTrigger reason)
string m_sSfxToggleEntities
Widget m_GamepadToggleSelectionWidget
override void HandlerAttachedScripted(Widget w)
string m_sSfxStartDrawingSelectionFrame_Keyboard
void EditorTeleportSelection4()
float m_fGamepadSelectionWidgetStartSize
bool DrawFrameController(set< SCR_EditableEntityComponent > entities, out set< SCR_EditableEntityComponent > entitiesInside)
InputManager m_InputManager
void EditorToggleSelection(float value=1, EActionTrigger reason=EActionTrigger.DOWN)
void DrawFrameDown(bool isToggle)
string m_sSfxSelectionFrameClose_NothingSelected
void EditorDrawToggleSelectionDown(float value, EActionTrigger reason)
SCR_MenuEditorComponent m_EditorMenuManager
void EditorDrawToggleSelectionUp(float value, EActionTrigger reason)
void OnMenuUpdate(float tDelta)
void DisableMultiSelection()
void EditorLoadSelection3()
void EditorTeleportSelection9()
Widget m_GamepadSetSelectionWidget
void EditorSaveSelection8()
SCR_EntitiesManagerEditorComponent m_EntitiesManager
void EditorDrawToggleSelectionPressed(float value, EActionTrigger reason)
SCR_StatesEditorComponent m_StatesManager
void EditorTeleportSelection(int index)
SCR_LayersEditorComponent m_LayersManager
static const float FRAME_SIZE_MIN
How many ref pixels must cursor move for frame selection to begin (mouse & keyboard).
void EditorLoadSelection2()
void EditorLoadSelection8()
string m_sSetSelectionWidgetName
Widget m_SetSelectionWidget
int m_iGamepadSelectionHeight
void EditorLoadSelection9()
void EditorSaveSelection2()
string m_sSfxSelectionFrameClose_Cancel
void EditorTeleportSelection3()
float m_fGamepadSelectionDuration
void EnableSelection(bool enable)
SCR_MouseAreaEditorUIComponent m_MouseArea
void ConfirmFrame(bool isToggle)
void EditorLoadSelection1()
void EditorTeleportSelection1()
WorkspaceWidget m_Workspace
void EditorSetSelection(float value=1, EActionTrigger reason=EActionTrigger.DOWN)
string m_sSfxClearSelection
void EditorSaveSelection6()
EEditableEntityState m_MultiSelectStates
void EditorSaveSelection9()
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
SCR_FieldOfViewSettings Attribute
EEditorState
Unique editor state.