expose strings from build palette widget to chrome yaml

prepare for localisation efforts
This commit is contained in:
Matthias Mailänder
2012-12-22 18:25:18 +01:00
parent b9194e4305
commit f107f8a87b
2 changed files with 10 additions and 3 deletions

View File

@@ -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<ProductionQueue> 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);