private void DrawTitle(float width) { for (int i = 0; i < _descArray.Count; i++) { // title label GUI.Label(LabelRect(width, i, 0), _descArray[i].TitleText + (_sortSlot == i ? _appearance.GetSortMark(_descending) : ""), _appearance.GetTitleStyle(_sortSlot == i)); // click event if (EditorTool.MouseClickInRect(LabelRect(width, i, 0))) { if (_sortSlot == i) { _descending = !_descending; } else { _sortSlot = i; } SortData(); _hostWindow.Repaint(); } } }