feature added
This commit is contained in:
@@ -7,6 +7,7 @@ using FlaxEditor.CustomEditors;
|
|||||||
using FlaxEditor.CustomEditors.Editors;
|
using FlaxEditor.CustomEditors.Editors;
|
||||||
using FlaxEditor.CustomEditors.Elements;
|
using FlaxEditor.CustomEditors.Elements;
|
||||||
using FlaxEditor.GUI;
|
using FlaxEditor.GUI;
|
||||||
|
using FlaxEditor.GUI.Tree;
|
||||||
using FlaxEditor.Viewport.Cameras;
|
using FlaxEditor.Viewport.Cameras;
|
||||||
using FlaxEditor.Viewport.Previews;
|
using FlaxEditor.Viewport.Previews;
|
||||||
using FlaxEngine;
|
using FlaxEngine;
|
||||||
@@ -166,8 +167,25 @@ namespace FlaxEditor.Windows.Assets
|
|||||||
var proxy = (PropertiesProxy)Values[0];
|
var proxy = (PropertiesProxy)Values[0];
|
||||||
int nodeIndex = (int)checkBox.Tag;
|
int nodeIndex = (int)checkBox.Tag;
|
||||||
proxy.NodesMask[nodeIndex] = checkBox.Checked;
|
proxy.NodesMask[nodeIndex] = checkBox.Checked;
|
||||||
|
if(Input.GetKey(KeyboardKeys.Shift))
|
||||||
|
SetTreeChecked(checkBox.Parent as TreeNode, checkBox.Checked);
|
||||||
proxy.Window.MarkAsEdited();
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user