示例#1
0
        public void UpdateColumnSettings(int columnIndex, MultiColumnHeaderState.Column columnSettings)
        {
            if (m_TableConfig == null || columnIndex >= m_TableConfig.columns.Length)
            {
                return;
            }

            var searchColumn = m_TableConfig.columns[columnIndex];

            searchColumn.width    = columnSettings.width;
            searchColumn.content  = columnSettings.headerContent;
            searchColumn.options &= ~SearchColumnFlags.TextAligmentMask;
            switch (columnSettings.headerTextAlignment)
            {
            case TextAlignment.Left: searchColumn.options |= SearchColumnFlags.TextAlignmentLeft; break;

            case TextAlignment.Center: searchColumn.options |= SearchColumnFlags.TextAlignmentCenter; break;

            case TextAlignment.Right: searchColumn.options |= SearchColumnFlags.TextAlignmentRight; break;
            }

            SearchAnalytics.SendEvent(null, SearchAnalytics.GenericEventType.QuickSearchTableEditColumn, searchColumn.name, searchColumn.provider, searchColumn.selector);

            SearchColumnSettings.Save(searchColumn);
            SetDirty();
        }
示例#2
0
        internal SearchColumn(string path, string selector, string provider, GUIContent content = null, SearchColumnFlags options = SearchColumnFlags.Default)
        {
            this.path     = path;
            this.selector = selector;
            this.provider = provider;
            this.options  = options;
            this.content  = content ?? new GUIContent(name);
            width         = 145f;

            if ((options & SearchColumnFlags.IgnoreSettings) == 0)
            {
                SearchColumnSettings.Load(this);
            }
            InitFunctors();
        }
示例#3
0
        public void UpdateColumnSettings(int columnIndex, MultiColumnHeaderState.Column columnSettings)
        {
            if (m_TableConfig == null)
                return;

            var searchColumn = m_TableConfig.columns[columnIndex];
            searchColumn.width = columnSettings.width;
            searchColumn.content = columnSettings.headerContent;
            searchColumn.options &= ~SearchColumnFlags.TextAligmentMask;
            switch (columnSettings.headerTextAlignment)
            {
                case TextAlignment.Left: searchColumn.options |= SearchColumnFlags.TextAlignmentLeft; break;
                case TextAlignment.Center: searchColumn.options |= SearchColumnFlags.TextAlignmentCenter; break;
                case TextAlignment.Right: searchColumn.options |= SearchColumnFlags.TextAlignmentRight; break;
            }

            SearchColumnSettings.Save(searchColumn);
        }