public int IndexOf(GenericMenuElementData p_element) { if (_cachedItems == null) { _cachedItems = RootData.GetNonFolderElements(); } return(_cachedItems.IndexOf(p_element)); }
public GenericMenuElementData GetCurrentSelectedItem() { if (_cachedItems == null) { _cachedItems = RootData.GetNonFolderElements(); } //Clamp Values m_selectedIndex = Mathf.Clamp(m_selectedIndex, -1, m_items.Count - 1); if (m_selectedIndex >= 0 && m_selectedIndex < _cachedItems.Count) { var v_selectedElement = _cachedItems[m_selectedIndex]; return(v_selectedElement); } return(null); }
public GenericMenuElementData GetCurrentSelectedFolder() { if (_cachedItems == null) { _cachedItems = RootData.GetNonFolderElements(); } var v_folderElement = RootData.GetFolderAtPath(SelectedFolderPath); //Invalid Path if (!string.IsNullOrEmpty(SelectedFolderPath) && v_folderElement == null) { m_selectedFolderPath = ""; } return(v_folderElement); }
protected GenericMenuElementData[] GetCurrentExpandedList() { if (_cachedItems == null) { _cachedItems = RootData.GetNonFolderElements(); } GenericMenuElementData[] v_list = null; GenericMenuElementData v_parent = GetCurrentSelectedFolder(); if (v_parent != null) { v_list = v_parent.GetChildren(); } else { v_list = RootData.GetRootElements(); } return(v_list); }