First version of Allies 03
This commit is contained in:
@@ -9,8 +9,6 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.RA.Missions
|
||||
{
|
||||
@@ -68,29 +66,4 @@ namespace OpenRA.Mods.RA.Missions
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class CountdownTimerWidget : Widget
|
||||
{
|
||||
public CountdownTimer Timer { get; set; }
|
||||
public string Format { get; set; }
|
||||
public float2 Position { get; set; }
|
||||
|
||||
public CountdownTimerWidget(CountdownTimer timer, string format, float2 position)
|
||||
{
|
||||
Timer = timer;
|
||||
Format = format;
|
||||
Position = position;
|
||||
}
|
||||
|
||||
public override void Draw()
|
||||
{
|
||||
if (!IsVisible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
var font = Game.Renderer.Fonts["Bold"];
|
||||
var text = Format.F(WidgetUtils.FormatTime(Timer.TicksLeft));
|
||||
font.DrawTextWithContrast(text, Position, Timer.TicksLeft <= 25 * 10 && Game.LocalTick % 50 < 25 ? Color.Red : Color.White, Color.Black, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user