GetSubmenusIncludingSeparators() private method

private GetSubmenusIncludingSeparators ( string menuPath ) : string[]
menuPath string
return string[]
Exemplo n.º 1
0
        public static void ExtractSubMenuWithPath(string path, GenericMenu menu, string replacementPath, UnityEngine.Object[] temporaryContext)
        {
            HashSet <string> stringSet = new HashSet <string>((IEnumerable <string>)Unsupported.GetSubmenus(path));

            foreach (string includingSeparator in Unsupported.GetSubmenusIncludingSeparators(path))
            {
                string replacementMenuString = replacementPath + includingSeparator.Substring(path.Length);
                if (stringSet.Contains(includingSeparator))
                {
                    MenuUtils.ExtractMenuItemWithPath(includingSeparator, menu, replacementMenuString, temporaryContext, -1, (System.Action <string, UnityEngine.Object[], int>)null, (System.Action <string, UnityEngine.Object[], int>)null);
                }
            }
        }
Exemplo n.º 2
0
        public static void ExtractSubMenuWithPath(string path, GenericMenu menu, string replacementPath, Object[] temporaryContext)
        {
            HashSet <string> set = new HashSet <string>(Unsupported.GetSubmenus(path));

            foreach (string str in Unsupported.GetSubmenusIncludingSeparators(path))
            {
                string replacementMenuString = replacementPath + str.Substring(path.Length);
                if (set.Contains(str))
                {
                    ExtractMenuItemWithPath(str, menu, replacementMenuString, temporaryContext, -1, null, null);
                }
            }
        }
Exemplo n.º 3
0
        public static void ExtractSubMenuWithPath(string path, GenericMenu menu, string replacementPath, UnityEngine.Object[] temporaryContext)
        {
            HashSet <string> hashSet = new HashSet <string>(Unsupported.GetSubmenus(path));

            string[] submenusIncludingSeparators = Unsupported.GetSubmenusIncludingSeparators(path);
            for (int i = 0; i < submenusIncludingSeparators.Length; i++)
            {
                string text = submenusIncludingSeparators[i];
                string replacementMenuString = replacementPath + text.Substring(path.Length);
                if (hashSet.Contains(text))
                {
                    MenuUtils.ExtractMenuItemWithPath(text, menu, replacementMenuString, temporaryContext, -1, null, null);
                }
            }
        }
Exemplo n.º 4
0
        public static void ExtractSubMenuWithPath(string path, GenericMenu menu, string replacementPath, Object[] temporaryContext)
        {
            HashSet <string> menusWithCommands = new HashSet <string>(Unsupported.GetSubmenus(path));

            string[] menus = Unsupported.GetSubmenusIncludingSeparators(path);
            for (int i = 0; i < menus.Length; i++)
            {
                string menuString         = menus[i];
                string replacedMenuString = replacementPath + menuString.Substring(path.Length);
                if (menusWithCommands.Contains(menuString))
                {
                    ExtractMenuItemWithPath(menuString, menu, replacedMenuString, temporaryContext, -1, null, null);
                }
                //else // Comment back in when GenericMenu can handle separators
                //  menu.AddSeparator(replacedMenuString);
            }
        }