Ejemplo n.º 1
0
        private void AddVariables(TreelistView.NodeCollection root, ShaderVariable[] vars)
        {
            foreach (var v in vars)
            {
                TreelistView.Node n = root.Add(new TreelistView.Node(new object[] { v.name, v, v.TypeString() }));

                if (v.rows > 1)
                {
                    for (int i = 0; i < v.rows; i++)
                    {
                        n.Nodes.Add(new TreelistView.Node(new object[] { String.Format("{0}.row{1}", v.name, i), v.Row(i), v.RowTypeString() }));
                    }
                }

                if (v.members.Length > 0)
                {
                    AddVariables(n.Nodes, v.members);
                }
            }
        }