From f107f8a87b5b20a1627f7a62b474b648b36a12de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 22 Dec 2012 18:25:18 +0100 Subject: [PATCH] expose strings from build palette widget to chrome yaml prepare for localisation efforts --- OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs | 10 +++++++--- mods/ra/chrome/ingame.yaml | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs b/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs index ea4a28b562..5130287d12 100755 --- a/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs +++ b/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs @@ -26,6 +26,10 @@ namespace OpenRA.Mods.RA.Widgets public int Columns = 3; public int Rows = 5; + public string ReadyText = ""; + public string HoldText = ""; + public string RequiresText = ""; + ProductionQueue CurrentQueue; List VisibleQueues; @@ -291,8 +295,8 @@ namespace OpenRA.Mods.RA.Widgets string GetOverlayForItem(ProductionItem item) { - if (item.Paused) return "ON HOLD"; - if (item.Done) return "READY"; + if (item.Paused) return HoldText; + if (item.Done) return ReadyText; return WidgetUtils.FormatTime(item.RemainingTimeActual); } @@ -484,7 +488,7 @@ namespace OpenRA.Mods.RA.Widgets var prereqs = buildable.Prerequisites .Select( a => Description( a ) ); Game.Renderer.Fonts["Regular"].DrawText( - "Requires {0}".F(prereqs.JoinWith(", ")), + "{0} {1}".F(RequiresText, prereqs.JoinWith(", ")), p.ToInt2(), Color.White); diff --git a/mods/ra/chrome/ingame.yaml b/mods/ra/chrome/ingame.yaml index fcfb2fb387..5ece2aa301 100644 --- a/mods/ra/chrome/ingame.yaml +++ b/mods/ra/chrome/ingame.yaml @@ -58,6 +58,9 @@ Container@INGAME_ROOT: Y:280 Width:250 Height:500 + ReadyText: READY + HoldText: ON HOLD + RequiresText: Requires Button@INGAME_OPTIONS_BUTTON: X:0 Y:0