Merge branch 'input-settings-changes' of https://github.com/Menotdan/FlaxEngine into Menotdan-input-settings-changes

# Conflicts:
#	Source/Editor/Modules/UIModule.cs
This commit is contained in:
Wojtek Figat
2024-03-04 18:33:16 +01:00
13 changed files with 222 additions and 77 deletions

View File

@@ -193,6 +193,7 @@ namespace FlaxEditor.Content.GUI
OnDelete?.Invoke(_selection);
}),
new InputActionsContainer.Binding(options => options.SelectAll, SelectAll),
new InputActionsContainer.Binding(options => options.DeselectAll, DeselectAll),
new InputActionsContainer.Binding(options => options.Rename, () =>
{
if (HasSelection && _selection[0].CanRename)
@@ -397,10 +398,7 @@ namespace FlaxEditor.Content.GUI
PerformLayout();
}
/// <summary>
/// Selects all the items.
/// </summary>
public void SelectAll()
private void BulkSelectUpdate(bool select = true)
{
// Lock layout
var wasLayoutLocked = IsLayoutLocked;
@@ -408,13 +406,30 @@ namespace FlaxEditor.Content.GUI
// Select items
_selection.Clear();
_selection.AddRange(_items);
if (select)
_selection.AddRange(_items);
// Unload and perform UI layout
IsLayoutLocked = wasLayoutLocked;
PerformLayout();
}
/// <summary>
/// Selects all the items.
/// </summary>
public void SelectAll()
{
BulkSelectUpdate(true);
}
/// <summary>
/// Deselects all the items.
/// </summary>
public void DeselectAll()
{
BulkSelectUpdate(false);
}
/// <summary>
/// Deselects the specified item.
/// </summary>