public static void doItems() { /* find the user that brought up a menu, and call its menuItems method */ string user_name = menus.MenuLevel(1); //Debug.Log("look in dict for " + component_name); UserBehavior script = user_dict[user_name]; int level = ccUtils.SubstringCount(menus.clicked, ":"); if (level == 1) { WindowRect = GUI.Window(1, WindowRect, script.MenuItems, "Item"); } else { string submenu = menus.MenuLevel(2); Debug.Log("submenu is <" + submenu + "> level is " + level + " clicked " + menus.clicked); switch (submenu) { case "Configure": Debug.Log("is configure"); script.Configure(); break; } } }