Allow a system chat label override.

This commit is contained in:
Matthias Mailänder
2020-05-06 20:45:06 +02:00
committed by Paul Chote
parent 73bba97aaa
commit 13a7de4b6b
2 changed files with 6 additions and 1 deletions

View File

@@ -476,6 +476,8 @@ namespace OpenRA
ChromeMetrics.TryGet("ChatMessageColor", out chatMessageColor);
ChromeMetrics.TryGet("SystemMessageColor", out systemMessageColor);
if (!ChromeMetrics.TryGet("SystemMessageLabel", out systemMessageLabel))
systemMessageLabel = "Battlefield Control";
ModData.LoadScreen.StartGame(args);
}
@@ -545,6 +547,8 @@ namespace OpenRA
static volatile ActionQueue delayedActions = new ActionQueue();
static Color systemMessageColor = Color.White;
static Color chatMessageColor = Color.White;
static string systemMessageLabel;
public static void RunAfterTick(Action a) { delayedActions.Add(a, RunTime); }
public static void RunAfterDelay(int delayMilliseconds, Action a) { delayedActions.Add(a, RunTime + delayMilliseconds); }
@@ -876,7 +880,7 @@ namespace OpenRA
public static void AddSystemLine(string text)
{
AddSystemLine("Battlefield Control", text);
AddSystemLine(systemMessageLabel, text);
}
public static void AddSystemLine(string name, string text)

View File

@@ -7,3 +7,4 @@ Metrics:
FactionSuffix-smuggler: ordos
FactionSuffix-mercenary: ordos
TextfieldColorHighlight: 7f4d29
SystemMessageLabel: Mentat