Use mission notifications pool with appropriate chat line template
This commit is contained in:
committed by
Matthias Mailänder
parent
a71da0a25a
commit
3310f14dea
@@ -31,6 +31,11 @@ namespace OpenRA
|
||||
AddTextNotification(TextNotificationPool.Feedback, SystemMessageLabel, text);
|
||||
}
|
||||
|
||||
public static void AddMissionLine(string prefix, string text, Color? prefixColor = null)
|
||||
{
|
||||
AddTextNotification(TextNotificationPool.Mission, prefix, text, prefixColor);
|
||||
}
|
||||
|
||||
public static void AddSystemLine(string text)
|
||||
{
|
||||
AddSystemLine(SystemMessageLabel, text);
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
return;
|
||||
|
||||
var c = color.HasValue ? color.Value : Color.White;
|
||||
TextNotificationsManager.AddChatLine(prefix, text, c);
|
||||
TextNotificationsManager.AddMissionLine(prefix, text, c);
|
||||
}
|
||||
|
||||
[Desc("Display a system message to the player. If 'prefix' is nil the default system prefix is used.")]
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
public string ChatTemplate = "CHAT_LINE_TEMPLATE";
|
||||
public string SystemTemplate = "SYSTEM_LINE_TEMPLATE";
|
||||
public string MissionTemplate = "SYSTEM_LINE_TEMPLATE";
|
||||
public string MissionTemplate = "CHAT_LINE_TEMPLATE";
|
||||
public string FeedbackTemplate = "TRANSIENT_LINE_TEMPLATE";
|
||||
readonly Dictionary<TextNotificationPool, Widget> templates = new Dictionary<TextNotificationPool, Widget>();
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Container@CHAT_PANEL:
|
||||
Templates:
|
||||
Chat: CHAT_LINE_TEMPLATE
|
||||
System: SYSTEM_LINE_TEMPLATE
|
||||
Mission: SYSTEM_LINE_TEMPLATE
|
||||
Mission: CHAT_LINE_TEMPLATE
|
||||
Children:
|
||||
Container@CHAT_OVERLAY:
|
||||
Width: PARENT_RIGHT - 24
|
||||
|
||||
@@ -6,7 +6,7 @@ Container@CHAT_CONTAINER:
|
||||
Templates:
|
||||
Chat: CHAT_LINE_TEMPLATE
|
||||
System: SYSTEM_LINE_TEMPLATE
|
||||
Mission: SYSTEM_LINE_TEMPLATE
|
||||
Mission: CHAT_LINE_TEMPLATE
|
||||
Children:
|
||||
Container@CHAT_CHROME:
|
||||
X: 15
|
||||
|
||||
@@ -3,7 +3,7 @@ Container@SERVER_LOBBY:
|
||||
ChatTemplates:
|
||||
Chat: CHAT_LINE_TEMPLATE
|
||||
System: SYSTEM_LINE_TEMPLATE
|
||||
Mission: SYSTEM_LINE_TEMPLATE
|
||||
Mission: CHAT_LINE_TEMPLATE
|
||||
Feedback: TRANSIENT_LINE_TEMPLATE
|
||||
X: (WINDOW_RIGHT - WIDTH) / 2
|
||||
Y: (WINDOW_BOTTOM - 560) / 2
|
||||
|
||||
@@ -9,7 +9,7 @@ Container@CHAT_PANEL:
|
||||
Templates:
|
||||
Chat: CHAT_LINE_TEMPLATE
|
||||
System: SYSTEM_LINE_TEMPLATE
|
||||
Mission: SYSTEM_LINE_TEMPLATE
|
||||
Mission: CHAT_LINE_TEMPLATE
|
||||
Children:
|
||||
Container@CHAT_OVERLAY:
|
||||
Width: PARENT_RIGHT - 24
|
||||
|
||||
@@ -6,7 +6,7 @@ Container@CHAT_CONTAINER:
|
||||
Templates:
|
||||
Chat: CHAT_LINE_TEMPLATE
|
||||
System: SYSTEM_LINE_TEMPLATE
|
||||
Mission: SYSTEM_LINE_TEMPLATE
|
||||
Mission: CHAT_LINE_TEMPLATE
|
||||
Children:
|
||||
Container@CHAT_CHROME:
|
||||
X: 20
|
||||
|
||||
@@ -3,7 +3,7 @@ Background@SERVER_LOBBY:
|
||||
ChatTemplates:
|
||||
Chat: CHAT_LINE_TEMPLATE
|
||||
System: SYSTEM_LINE_TEMPLATE
|
||||
Mission: SYSTEM_LINE_TEMPLATE
|
||||
Mission: CHAT_LINE_TEMPLATE
|
||||
Feedback: TRANSIENT_LINE_TEMPLATE
|
||||
X: (WINDOW_RIGHT - WIDTH) / 2
|
||||
Y: (WINDOW_BOTTOM - HEIGHT) / 2
|
||||
|
||||
Reference in New Issue
Block a user