Change enum and variable name
This commit is contained in:
@@ -30,7 +30,7 @@ namespace FlaxEditor.Content.GUI
|
||||
/// <summary>
|
||||
/// The method sort for items.
|
||||
/// </summary>
|
||||
public enum MethodSort
|
||||
public enum SortType
|
||||
{
|
||||
/// <summary>
|
||||
/// The classic alphabetic sort method (A-Z).
|
||||
@@ -234,9 +234,9 @@ namespace FlaxEditor.Content.GUI
|
||||
/// Shows the items collection in the view.
|
||||
/// </summary>
|
||||
/// <param name="items">The items to show.</param>
|
||||
/// <param name="sortMethod">The sort method for items.</param>
|
||||
/// <param name="sortType">The sort method for items.</param>
|
||||
/// <param name="additive">If set to <c>true</c> items will be added to the current selection. Otherwise selection will be cleared before.</param>
|
||||
public void ShowItems(List<ContentItem> items, MethodSort sortMethod, bool additive = false)
|
||||
public void ShowItems(List<ContentItem> items, SortType sortType, bool additive = false)
|
||||
{
|
||||
if (items == null)
|
||||
throw new ArgumentNullException();
|
||||
@@ -269,7 +269,7 @@ namespace FlaxEditor.Content.GUI
|
||||
// Sort items depending on sortMethod parameter
|
||||
_children.Sort(((control, control1) =>
|
||||
{
|
||||
if (sortMethod == MethodSort.AlphabeticReverse)
|
||||
if (sortType == SortType.AlphabeticReverse)
|
||||
{
|
||||
if (control.CompareTo(control1) > 0)
|
||||
{
|
||||
|
||||
@@ -230,7 +230,7 @@ namespace FlaxEditor.Windows
|
||||
}
|
||||
|
||||
_view.IsSearching = true;
|
||||
_view.ShowItems(items, Editor.Windows.ContentWin._sortBy);
|
||||
_view.ShowItems(items, Editor.Windows.ContentWin._sortType);
|
||||
}
|
||||
|
||||
private void UpdateItemsSearchFilter(ContentFolder folder, List<ContentItem> items, bool[] filters)
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace FlaxEditor.Windows
|
||||
private TextBox _foldersSearchBox;
|
||||
private TextBox _itemsSearchBox;
|
||||
private ViewDropdown _viewDropdown;
|
||||
private MethodSort _sortBy;
|
||||
private SortType _sortType;
|
||||
|
||||
private RootContentTreeNode _root;
|
||||
|
||||
@@ -239,9 +239,9 @@ namespace FlaxEditor.Windows
|
||||
{
|
||||
switch (button.Text)
|
||||
{
|
||||
case "Alphabetic Order": Editor.Windows.ContentWin._sortBy = MethodSort.AlphabeticOrder;
|
||||
case "Alphabetic Order": Editor.Windows.ContentWin._sortType = SortType.AlphabeticOrder;
|
||||
break;
|
||||
case "Alphabetic Reverse": Editor.Windows.ContentWin._sortBy = MethodSort.AlphabeticReverse;
|
||||
case "Alphabetic Reverse": Editor.Windows.ContentWin._sortType = SortType.AlphabeticReverse;
|
||||
break;
|
||||
}
|
||||
RefreshView(SelectedNode);
|
||||
@@ -718,12 +718,12 @@ namespace FlaxEditor.Windows
|
||||
items.Add(node.Folder);
|
||||
}
|
||||
}
|
||||
_view.ShowItems(items, Editor.Windows.ContentWin._sortBy);
|
||||
_view.ShowItems(items, Editor.Windows.ContentWin._sortType);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Show folder contents
|
||||
_view.ShowItems(target.Folder.Children, Editor.Windows.ContentWin._sortBy);
|
||||
_view.ShowItems(target.Folder.Children, Editor.Windows.ContentWin._sortType);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user