Merge branch 'patch-declarationSort' of git://github.com/honzapatCZ/FlaxEngine into honzapatCZ-patch-declarationSort

This commit is contained in:
Wojtek Figat
2021-03-14 19:29:02 +01:00
4 changed files with 63 additions and 0 deletions

View File

@@ -173,6 +173,14 @@ namespace FlaxEditor.CustomEditors.Editors
return string.Compare(Display.Group, other.Display.Group, StringComparison.InvariantCulture);
}
if(Editor.Instance.Options.Options.General.ScriptMembersOrder == Options.GeneralOptions.MembersOrder.Declaration)
{
// By declaration order
if (Info.MetadataToken > other.Info.MetadataToken)
return 1;
else if (Info.MetadataToken < other.Info.MetadataToken)
return -1;
}
// By name
return string.Compare(Info.Name, other.Info.Name, StringComparison.InvariantCulture);
}