First version of Allies 03

This commit is contained in:
Scott_NZ
2012-11-02 20:38:53 +13:00
parent 787facec65
commit 0cdff00cb6
9 changed files with 1546 additions and 40 deletions

View File

@@ -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);
}
}
}