Merge pull request #2526 from Mailaender/strings
made all in-game strings customisable via .yaml files
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -474,7 +478,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);
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
{
|
||||
class SupportPowerBinWidget : Widget
|
||||
{
|
||||
public string ReadyText = "";
|
||||
public string HoldText = "";
|
||||
|
||||
Dictionary<string, Sprite> spsprites;
|
||||
Animation clock;
|
||||
readonly List<Pair<Rectangle, Action<MouseInput>>> buttons = new List<Pair<Rectangle,Action<MouseInput>>>();
|
||||
@@ -148,7 +151,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
|
||||
WidgetUtils.DrawSHP(clock.Image, drawPos, worldRenderer);
|
||||
|
||||
var overlay = sp.Ready ? "READY" : sp.Active ? null : "ON HOLD";
|
||||
var overlay = sp.Ready ? ReadyText : sp.Active ? null : HoldText;
|
||||
var font = Game.Renderer.Fonts["TinyBold"];
|
||||
if (overlay != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user