private void RenderNodeTree(IEnumerable <Node> nodes) { foreach (var node in nodes) { Engine.Tool.PushID(node.GetHashCode()); bool treeNode = Engine.Tool.TreeNodeEx(node.ToString(), _viewModel.GetNodeStatus(node)); if (Engine.Tool.IsItemClicked(ToolMouseButton.Left)) { _viewModel.OnNodeSelected(node); } if (Engine.Tool.IsItemClicked(ToolMouseButton.Right)) { Engine.Tool.OpenPopup(menuKey, ToolPopupFlags.None); } RenderPopupMenu(node); if (treeNode) { RenderNodeTree(node.Children); Engine.Tool.TreePop(); } Engine.Tool.PopID(); } }
private void RenderNodeTree(IEnumerable <Node> nodes) { foreach (var node in nodes) { Engine.Tool.PushID(node.GetHashCode()); bool treeNode = Engine.Tool.TreeNodeEx(node.ToString(), _viewModel.GetNodeStatus(node)); if (Engine.Tool.IsItemClicked(0)) { _viewModel.OnNodeSelected(node); } if (treeNode) { RenderNodeTree(node.Children); Engine.Tool.TreePop(); } Engine.Tool.PopID(); } }