Пример #1
0
        public ProfileTreeView(TreeViewState state, MultiColumnHeaderState multiColumnHeaderState, ProfileColumnHeader profileColumnHeader, ProfileWindow window) :
            base(state, profileColumnHeader)
        {
            m_Mchs    = multiColumnHeaderState;
            m_Window  = window;
            rowHeight = kRowHeights;
            showAlternatingRowBackgrounds = true;
            showBorder = true;
            profileColumnHeader.sortingChanged += OnSortingChanged;

            Reload();
        }
Пример #2
0
        internal ProfileTreeView(TreeViewState treeViewState, List <AddressableAssetProfileSettings.BuildProfile> profiles, ProfileWindow window,
                                 MultiColumnHeader header) : base(treeViewState, header)
        {
            m_Window      = window;
            m_ProfileList = profiles;
            m_Names       = new List <string>();
            m_TreeIndexToBuildProfileMap = new Dictionary <int, AddressableAssetProfileSettings.BuildProfile>();
            if (m_Window.ProfileIndex == -1)
            {
                m_Window.ProfileIndex = 0;
            }

            Reload();

            if (m_Window.ProfileIndex >= 0)
            {
                SetSelection(new List <int> {
                    m_Window.ProfileIndex
                });
            }
        }
        public ProfileRenamePopUp(ProfileWindow window, float width, int colIndex, string id = "")
        {
            m_Window = window;
            m_id     = id;
            k_Width  = width;

            m_FieldStyle = new GUIStyle(EditorStyles.textField);
            m_FieldStyle.focused.background = EditorStyles.textField.focused.background;

            // Renaming a profile
            if (colIndex == 0)
            {
                m_Index = GetProfileIndexById(id);
                m_Text  = m_Window.settings.profileSettings.GetProfileName(id);
                m_FieldStyle.alignment = TextAnchor.UpperLeft;
                m_Mode = RenameMode.Profile;
            }
            // Renaming a variable
            else if (colIndex > 0 && m_id == "")
            {
                m_Index = colIndex - 1;
                m_Text  = m_Window.settings.profileSettings.profileEntryNames[m_Index].ProfileName;
                m_FieldStyle.alignment = TextAnchor.MiddleLeft;
                m_Mode = RenameMode.Variable;
            }
            // Renaming a variable value
            else
            {
                m_Index = colIndex - 1;
                m_Text  = m_Window.settings.profileSettings.GetProfile(m_id).values[m_Index].value;
                m_FieldStyle.alignment = TextAnchor.UpperLeft;
                m_Mode = RenameMode.Value;
            }

            m_OrigText = m_Text;
        }
Пример #4
0
 public ProfileColumnHeader(MultiColumnHeaderState state, ProfileWindow window) : base(state)
 {
     m_Window = window;
 }