From c546cb552e5a57c263b08e378b763b736a8a34ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Fri, 31 Jul 2020 22:32:30 +0200 Subject: [PATCH] Make the fonts configurable. --- OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs b/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs index 4d915e8153..0d2f9079c5 100644 --- a/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ProductionPaletteWidget.cs @@ -65,6 +65,9 @@ namespace OpenRA.Mods.Common.Widgets public readonly string NotBuildableSequence = "idle"; public readonly string NotBuildablePalette = "chrome"; + public readonly string OverlayFont = "TinyBold"; + public readonly string SymbolsFont = "Symbols"; + public readonly bool DrawTime = true; [Translate] @@ -149,8 +152,8 @@ namespace OpenRA.Mods.Common.Widgets cantBuild.PlayFetchIndex(NotBuildableSequence, () => 0); clock = new Animation(world, ClockAnimation); - overlayFont = Game.Renderer.Fonts["TinyBold"]; - Game.Renderer.Fonts.TryGetValue("Symbols", out symbolFont); + overlayFont = Game.Renderer.Fonts[OverlayFont]; + Game.Renderer.Fonts.TryGetValue(SymbolsFont, out symbolFont); } public override void Initialize(WidgetArgs args)