Tidy more uses of BottomRight/TopLeft, bogus location of FormatTime.

This commit is contained in:
Paul Chote
2010-11-24 11:37:18 +13:00
parent de8603832f
commit b8eda5a152
8 changed files with 29 additions and 34 deletions

View File

@@ -465,7 +465,7 @@ namespace OpenRA.Mods.RA.Widgets
var lowpower = power.PowerState != PowerState.Normal;
var time = CurrentQueue.GetBuildTime(info.Name)
* ((lowpower)? CurrentQueue.Info.LowPowerSlowdown : 1);
DrawRightAligned(WorldUtils.FormatTime(time), pos + new int2(-5, 35), lowpower ? Color.Red: Color.White);
DrawRightAligned(WidgetUtils.FormatTime(time), pos + new int2(-5, 35), lowpower ? Color.Red: Color.White);
var bi = info.Traits.GetOrDefault<BuildingInfo>();
if (bi != null)

View File

@@ -121,8 +121,8 @@ namespace OpenRA.Mods.RA.Widgets
Game.Renderer.BoldFont.DrawText(sp.Info.Description, pos, Color.White);
pos += new int2(0,20);
Game.Renderer.BoldFont.DrawText(WorldUtils.FormatTime(sp.RemainingTime).ToString(), pos, Color.White);
Game.Renderer.BoldFont.DrawText("/ {0}".F(WorldUtils.FormatTime(sp.TotalTime)), pos + new int2(45,0), Color.White);
Game.Renderer.BoldFont.DrawText(WidgetUtils.FormatTime(sp.RemainingTime).ToString(), pos, Color.White);
Game.Renderer.BoldFont.DrawText("/ {0}".F(WidgetUtils.FormatTime(sp.TotalTime)), pos + new int2(45,0), Color.White);
if (sp.Info.LongDesc != null)
{

View File

@@ -66,12 +66,12 @@ namespace OpenRA.Mods.RA.Widgets
{
// losing
tc = "Strategic defeat in " +
((svc.CriticalTicksLeft > svc.TicksLeft) ? WorldUtils.FormatTime(svc.CriticalTicksLeft) : WorldUtils.FormatTime(svc.TicksLeft));
((svc.CriticalTicksLeft > svc.TicksLeft) ? WidgetUtils.FormatTime(svc.CriticalTicksLeft) : WidgetUtils.FormatTime(svc.TicksLeft));
}else
{
// winning
tc = "Strategic victory in " +
((svc.CriticalTicksLeft > svc.TicksLeft) ? WorldUtils.FormatTime(svc.CriticalTicksLeft) : WorldUtils.FormatTime(svc.TicksLeft));
((svc.CriticalTicksLeft > svc.TicksLeft) ? WidgetUtils.FormatTime(svc.CriticalTicksLeft) : WidgetUtils.FormatTime(svc.TicksLeft));
}
var size = Game.Renderer.BoldFont.Measure(tc);