Add an option to order maps by size

This commit is contained in:
Gustas
2023-07-10 15:52:45 +03:00
committed by abcdefg30
parent de5bcbbca5
commit 9caf12d133
2 changed files with 5 additions and 0 deletions

View File

@@ -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];

View File

@@ -469,6 +469,7 @@ options-order-maps =
.player-count = Players
.title = Title
.date = Date
.size = Size
## MissionBrowserLogic
dialog-no-video =