public void PushItem(string label, Action clickedEvent = null)
        {
            BreadcrumbItem breadcrumbItem = new BreadcrumbItem(m_Asset, clickedEvent);

            breadcrumbItem.Label.text = label;
            breadcrumbItem.EnableInClassList("first", m_ItemCount == 0);
            Insert(m_ItemCount, breadcrumbItem);
            m_ItemCount++;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds an item to the end of the breadcrumbs, which makes that item the deepest item in the hierarchy.
        /// </summary>
        /// <param name="label">The text to display for the item in the breadcrumb toolbar.</param>
        /// <param name="clickedEvent">The action to perform when the a users clicks the item in the toolbar.</param>
        public void PushItem(string label, Action clickedEvent = null)
        {
            BreadcrumbItem breadcrumbItem = new BreadcrumbItem(clickedEvent)
            {
                text = label
            };

            breadcrumbItem.EnableInClassList(firstItemClassName, childCount == 0);
            Add(breadcrumbItem);
        }