From 9caf12d133d10e97e661f100bd364701431f3465 Mon Sep 17 00:00:00 2001 From: Gustas <37534529+PunkPun@users.noreply.github.com> Date: Mon, 10 Jul 2023 15:52:45 +0300 Subject: [PATCH] Add an option to order maps by size --- OpenRA.Mods.Common/Widgets/Logic/MapChooserLogic.cs | 4 ++++ mods/common/languages/en.ftl | 1 + 2 files changed, 5 insertions(+) diff --git a/OpenRA.Mods.Common/Widgets/Logic/MapChooserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MapChooserLogic.cs index 5592d839a0..ed2d2b77b9 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MapChooserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MapChooserLogic.cs @@ -72,6 +72,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic [TranslationReference] const string OrderMapsByDate = "options-order-maps.date"; + [TranslationReference] + const string OrderMapsBySize = "options-order-maps.size"; + readonly string allMaps; readonly Widget widget; @@ -292,6 +295,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic { orderByPlayer, m => m.PlayerCount }, { TranslationProvider.GetString(OrderMapsByTitle), null }, { TranslationProvider.GetString(OrderMapsByDate), m => -m.ModifiedDate.Ticks }, + { TranslationProvider.GetString(OrderMapsBySize), m => m.Bounds.Width * m.Bounds.Height }, }; orderByFunc = orderByDict[orderByPlayer]; diff --git a/mods/common/languages/en.ftl b/mods/common/languages/en.ftl index 809044b4f3..ce3bca263c 100644 --- a/mods/common/languages/en.ftl +++ b/mods/common/languages/en.ftl @@ -469,6 +469,7 @@ options-order-maps = .player-count = Players .title = Title .date = Date + .size = Size ## MissionBrowserLogic dialog-no-video =