feature added

This commit is contained in:
Cristhofer Marques
2022-10-11 11:49:32 -03:00
parent 76a66cf400
commit 2af285e972

View File

@@ -7,6 +7,7 @@ using FlaxEditor.CustomEditors;
using FlaxEditor.CustomEditors.Editors;
using FlaxEditor.CustomEditors.Elements;
using FlaxEditor.GUI;
using FlaxEditor.GUI.Tree;
using FlaxEditor.Viewport.Cameras;
using FlaxEditor.Viewport.Previews;
using FlaxEngine;
@@ -166,8 +167,25 @@ namespace FlaxEditor.Windows.Assets
var proxy = (PropertiesProxy)Values[0];
int nodeIndex = (int)checkBox.Tag;
proxy.NodesMask[nodeIndex] = checkBox.Checked;
if(Input.GetKey(KeyboardKeys.Shift))
SetTreeChecked(checkBox.Parent as TreeNode, checkBox.Checked);
proxy.Window.MarkAsEdited();
}
private void SetTreeChecked(TreeNode tree, bool state)
{
foreach(var node in tree.Children)
{
if(node is TreeNode)
{
SetTreeChecked(node as TreeNode, state);
}
if(node is CheckBox)
{
(node as CheckBox).Checked = state;
}
}
}
}
}