diff --git a/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs b/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs index ab594a290f..5001f0c4c7 100644 --- a/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs +++ b/OpenRA.Mods.Cnc/Widgets/ProductionPaletteWidget.cs @@ -14,6 +14,7 @@ using System.Drawing; using System.Linq; using OpenRA.FileFormats; using OpenRA.Graphics; +using OpenRA.Network; using OpenRA.Mods.RA; using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Orders; @@ -43,6 +44,7 @@ namespace OpenRA.Mods.Cnc.Widgets public string TooltipActor { get; private set; } public readonly World World; + readonly OrderManager orderManager; Lazy tooltipContainer; ProductionQueue currentQueue; @@ -62,8 +64,9 @@ namespace OpenRA.Mods.Cnc.Widgets float2 holdOffset, readyOffset, timeOffset, queuedOffset; [ObjectCreator.UseCtor] - public ProductionPaletteWidget(World world, WorldRenderer worldRenderer) + public ProductionPaletteWidget(OrderManager orderManager, World world, WorldRenderer worldRenderer) { + this.orderManager = orderManager; this.World = world; this.worldRenderer = worldRenderer; tooltipContainer = Exts.Lazy(() => @@ -244,9 +247,13 @@ namespace OpenRA.Mods.Cnc.Widgets var first = icon.Queued[0]; var waiting = first != CurrentQueue.CurrentItem() && !first.Done; if (first.Done) - overlayFont.DrawTextWithContrast(ReadyText, - icon.Pos + readyOffset, - Color.White, Color.Black, 1); + { + // Blink the ready text + if (orderManager.LocalFrameNumber / 25 % 2 == 0) + overlayFont.DrawTextWithContrast(ReadyText, + icon.Pos + readyOffset, + Color.White, Color.Black, 1); + } else if (first.Paused) overlayFont.DrawTextWithContrast(HoldText, icon.Pos + holdOffset, diff --git a/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs b/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs index 9a5e1d3ee2..d1dd5de4b3 100755 --- a/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs +++ b/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs @@ -15,6 +15,7 @@ using System.Linq; using OpenRA.Graphics; using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Orders; +using OpenRA.Network; using OpenRA.Primitives; using OpenRA.Traits; using OpenRA.Widgets; @@ -53,10 +54,12 @@ namespace OpenRA.Mods.RA.Widgets readonly WorldRenderer worldRenderer; readonly World world; + readonly OrderManager orderManager; [ObjectCreator.UseCtor] - public BuildPaletteWidget(World world, WorldRenderer worldRenderer) + public BuildPaletteWidget(OrderManager orderManager, World world, WorldRenderer worldRenderer) { + this.orderManager = orderManager; this.world = world; this.worldRenderer = worldRenderer; @@ -299,8 +302,12 @@ namespace OpenRA.Mods.RA.Widgets string GetOverlayForItem(ProductionItem item) { - if (item.Paused) return HoldText; - if (item.Done) return ReadyText; + if (item.Paused) + return HoldText; + + if (item.Done) + return orderManager.LocalFrameNumber / 25 % 2 == 0 ? ReadyText : ""; + return WidgetUtils.FormatTime(item.RemainingTimeActual); }