Extract editor brush texts.

This commit is contained in:
Matthias Mailänder
2023-05-20 19:55:17 +02:00
committed by abcdefg30
parent 8433bc0948
commit c9dddc342c
8 changed files with 69 additions and 11 deletions

View File

@@ -155,6 +155,9 @@ namespace OpenRA.Mods.Common.Widgets
class PaintTileEditorAction : IEditorAction
{
[TranslationReference("id")]
const string AddedTile = "notification-added-tile";
public string Text { get; }
readonly ushort template;
@@ -172,7 +175,7 @@ namespace OpenRA.Mods.Common.Widgets
var terrainInfo = (ITemplatedTerrainInfo)map.Rules.TerrainInfo;
terrainTemplate = terrainInfo.Templates[template];
Text = $"Added tile {terrainTemplate.Id}";
Text = TranslationProvider.GetString(AddedTile, Translation.Arguments("id", terrainTemplate.Id));
}
public void Execute()
@@ -224,6 +227,9 @@ namespace OpenRA.Mods.Common.Widgets
class FloodFillEditorAction : IEditorAction
{
[TranslationReference("id")]
const string FilledTile = "notification-filled-tile";
public string Text { get; }
readonly ushort template;
@@ -241,7 +247,7 @@ namespace OpenRA.Mods.Common.Widgets
var terrainInfo = (ITemplatedTerrainInfo)map.Rules.TerrainInfo;
terrainTemplate = terrainInfo.Templates[template];
Text = $"Filled with tile {terrainTemplate.Id}";
Text = TranslationProvider.GetString(FilledTile, Translation.Arguments("id", terrainTemplate.Id));
}
public void Execute()