Editor - Template categories are now ordered by whats specified in the tileset yaml

This commit is contained in:
Curtis Shmyr
2012-12-09 16:01:10 -07:00
committed by Chris Forbes
parent b56125fa39
commit ac301b22e2
5 changed files with 34 additions and 16 deletions

View File

@@ -150,7 +150,8 @@ namespace OpenRA.Editor
var palettes = new[] { tilePalette, actorPalette, resourcePalette };
foreach (var p in palettes) { p.Visible = false; p.SuspendLayout(); }
foreach (var tc in tileset.Templates.GroupBy(t => t.Value.Category))
string[] templateOrder = tileset.EditorTemplateOrder ?? new string[]{};
foreach (var tc in tileset.Templates.GroupBy(t => t.Value.Category).OrderBy(t => templateOrder.ToList().IndexOf(t.Key)))
{
var category = tc.Key ?? "(Uncategorized)";
var categoryHeader = new Label