From cc449f81f8a8982dc94bad961065db28ab71609d Mon Sep 17 00:00:00 2001 From: Scott_NZ Date: Fri, 31 Aug 2012 14:15:43 +1200 Subject: [PATCH] Describe the map size in words --- OpenRA.Mods.RA/Widgets/Logic/MapChooserLogic.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Widgets/Logic/MapChooserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/MapChooserLogic.cs index 6de808870b..1db26b7956 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/MapChooserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/MapChooserLogic.cs @@ -100,7 +100,15 @@ namespace OpenRA.Mods.RA.Widgets.Logic var sizeWidget = item.Get("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); }