Script list is now sorted in alphabetical order
This commit is contained in:
parent
0f0542f46f
commit
d8756cfcf7
|
@ -903,6 +903,12 @@ namespace SHADE
|
||||||
{
|
{
|
||||||
return pair->type;
|
return pair->type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Sort */
|
||||||
|
System::String^ sortKeyAccessor(System::Type^ type)
|
||||||
|
{
|
||||||
|
return type->Name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptStore::refreshScriptTypeList()
|
void ScriptStore::refreshScriptTypeList()
|
||||||
|
@ -926,6 +932,10 @@ namespace SHADE
|
||||||
Func<Pair^, Type^>^ selector = gcnew Func<Pair^, Type^>(selectorFunc);
|
Func<Pair^, Type^>^ selector = gcnew Func<Pair^, Type^>(selectorFunc);
|
||||||
scriptTypeList = Enumerable::Select(whereResult, selector);
|
scriptTypeList = Enumerable::Select(whereResult, selector);
|
||||||
|
|
||||||
|
/* Sort: By Alphabetical Order */
|
||||||
|
Func<Type^, String^>^ sorter = gcnew Func<Type^, String^>(sortKeyAccessor);
|
||||||
|
scriptTypeList = Enumerable::OrderBy(scriptTypeList, sorter);
|
||||||
|
|
||||||
// Log
|
// Log
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << "[ScriptStore] Successfully retrieved references to " << Enumerable::Count(scriptTypeList)
|
oss << "[ScriptStore] Successfully retrieved references to " << Enumerable::Count(scriptTypeList)
|
||||||
|
|
Loading…
Reference in New Issue