Ejemplo n.º 1
0
        //Factory

        internal static GUIListNode CreateListNode1Lvl(List <string[]> allNodes, DoButtonPress Action = null)
        {
            GUIListNode rootNode = new GUIListNode(new string[] { "" }, false, null, false, 0, true);

            foreach (var value in allNodes)
            {
                rootNode.AddNode(new GUIListNode(value, Action != null, Action, false, 1));
            }

            return(rootNode);
        }
Ejemplo n.º 2
0
        internal static GUIListNode CreateListNode2Lvl(Dictionary <string[], List <string[]> > allNodes,
                                                       DoButtonPress lvl2Action = null, DoButtonPress lvl1Action = null)
        {
            GUIListNode rootNode = new GUIListNode(new string[] { "" }, false, null, false, 0, true);

            foreach (var lvl1Pair in allNodes)
            {
                var lvl1Node = new GUIListNode(lvl1Pair.Key, true, lvl1Action, true, 1);

                foreach (var value in lvl1Pair.Value)
                {
                    lvl1Node.AddNode(new GUIListNode(value, lvl2Action != null, lvl2Action, false, 2));
                }
                rootNode.AddNode(lvl1Node);
            }
            return(rootNode);
        }