From 0765fa92b5801f3b4b557576236064042e19fd23 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 16 May 2024 14:11:11 +0200 Subject: [PATCH] Add option to move all selected UI Controls while holding `Shift` key --- Source/Editor/Gizmo/UIEditorGizmo.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/Editor/Gizmo/UIEditorGizmo.cs b/Source/Editor/Gizmo/UIEditorGizmo.cs index 5b7535b5d..26cf02972 100644 --- a/Source/Editor/Gizmo/UIEditorGizmo.cs +++ b/Source/Editor/Gizmo/UIEditorGizmo.cs @@ -253,7 +253,11 @@ namespace FlaxEditor { // Select node (with additive mode) var selection = new List(); - if (Root.GetKey(KeyboardKeys.Control)) + if (Root.GetKey(KeyboardKeys.Shift) && transformGizmo.Selection.Contains(uiControlNode)) + { + // Move whole selection + } + else if (Root.GetKey(KeyboardKeys.Control)) { // Add/remove from selection selection.AddRange(transformGizmo.Selection); @@ -261,13 +265,14 @@ namespace FlaxEditor selection.Remove(uiControlNode); else selection.Add(uiControlNode); + owner.Select(selection); } else { // Select selection.Add(uiControlNode); + owner.Select(selection); } - owner.Select(selection); // Initialize control movement _mouseMovesControl = true;