From ec0849c9081dd95832e6aaa3691d4a81e6b1c906 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 19 Feb 2024 19:12:53 +0100 Subject: [PATCH] Add Ctrl for additive selection in rubberband --- Source/Editor/Content/GUI/ContentView.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Editor/Content/GUI/ContentView.cs b/Source/Editor/Content/GUI/ContentView.cs index 83c5377b7..755a3a1ac 100644 --- a/Source/Editor/Content/GUI/ContentView.cs +++ b/Source/Editor/Content/GUI/ContentView.cs @@ -616,6 +616,7 @@ namespace FlaxEditor.Content.GUI { if (base.OnMouseDown(location, button)) return true; + if (button == MouseButton.Left) { _mousePresslocation = location; @@ -634,6 +635,7 @@ namespace FlaxEditor.Content.GUI _rubberBandRectangle.Width = location.X - _mousePresslocation.X; _rubberBandRectangle.Height = location.Y - _mousePresslocation.Y; } + base.OnMouseMove(location); } @@ -655,9 +657,10 @@ namespace FlaxEditor.Content.GUI _rubberBandRectangle.Size = size; } var itemsInRectangle = _items.Where(t => _rubberBandRectangle.Intersects(t.Bounds)).ToList(); - Select(itemsInRectangle, Input.GetKey(KeyboardKeys.Shift)); + Select(itemsInRectangle, Input.GetKey(KeyboardKeys.Shift) || Input.GetKey(KeyboardKeys.Control)); return true; } + return base.OnMouseUp(location, button); }