Add transient notifications pool
This commit is contained in:
committed by
Paul Chote
parent
e22b6de4e8
commit
a1e6ac85dc
@@ -28,6 +28,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
public string SystemTemplate = "SYSTEM_LINE_TEMPLATE";
|
||||
public string MissionTemplate = "CHAT_LINE_TEMPLATE";
|
||||
public string FeedbackTemplate = "TRANSIENT_LINE_TEMPLATE";
|
||||
public string TransientsTemplate = "TRANSIENT_LINE_TEMPLATE";
|
||||
readonly Dictionary<TextNotificationPool, Widget> templates = new Dictionary<TextNotificationPool, Widget>();
|
||||
|
||||
readonly List<int> expirations = new List<int>();
|
||||
@@ -43,6 +44,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
templates.Add(TextNotificationPool.System, Ui.LoadWidget(SystemTemplate, null, new WidgetArgs()));
|
||||
templates.Add(TextNotificationPool.Mission, Ui.LoadWidget(MissionTemplate, null, new WidgetArgs()));
|
||||
templates.Add(TextNotificationPool.Feedback, Ui.LoadWidget(FeedbackTemplate, null, new WidgetArgs()));
|
||||
templates.Add(TextNotificationPool.Transients, Ui.LoadWidget(TransientsTemplate, null, new WidgetArgs()));
|
||||
|
||||
// HACK: Assume that all templates use the same font
|
||||
var lineHeight = Game.Renderer.Fonts[templates[TextNotificationPool.Chat].Get<LabelWidget>("TEXT").Font].Measure("").Y;
|
||||
|
||||
Reference in New Issue
Block a user