Collapse/Expand all node in the tree if the user is pressing the Alt key.

This commit is contained in:
MineBill
2023-10-19 18:55:58 +03:00
parent 2f3685c161
commit c773c3e8fc

View File

@@ -776,11 +776,20 @@ namespace FlaxEditor.GUI.Tree
// Check if mouse hits arrow // Check if mouse hits arrow
if (_mouseOverArrow && HasAnyVisibleChild) if (_mouseOverArrow && HasAnyVisibleChild)
{ {
// Toggle open state if (ParentTree.Root.GetKey(KeyboardKeys.Alt))
if (_opened) {
Collapse(); if (_opened)
CollapseAll();
else
ExpandAll();
}
else else
Expand(); {
if (_opened)
Collapse();
else
Expand();
}
} }
// Check if mouse hits bar // Check if mouse hits bar