Describe the map size in words

This commit is contained in:
Scott_NZ
2012-08-31 14:15:43 +12:00
committed by Chris Forbes
parent 085e29d22b
commit cc449f81f8

View File

@@ -100,7 +100,15 @@ namespace OpenRA.Mods.RA.Widgets.Logic
var sizeWidget = item.Get<LabelWidget>("SIZE");
if (sizeWidget != null)
sizeWidget.GetText = () => m.Bounds.Width + "x" + m.Bounds.Height;
{
var size = m.Bounds.Width + "x" + m.Bounds.Height;
var numberPlayableCells = m.Bounds.Width * m.Bounds.Height;
if (numberPlayableCells >= 120 * 120) size += " (Large)";
else if (numberPlayableCells >= 90 * 90) size += " (Medium)";
else if (numberPlayableCells >= 60 * 60) size += " (Small)";
else size += " (Tiny)";
sizeWidget.GetText = () => size;
}
scrollpanel.AddChild(item);
}