Tidy more uses of BottomRight/TopLeft, bogus location of FormatTime.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user