Skip to content

Commit

Permalink
Made some adjustments to get it to work on 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
CryZe committed Jun 13, 2015
1 parent e6bd91f commit 662e90e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions UI/Components/WorldRecordComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class WorldRecordComponent : IComponent
private TimeSpan RefreshInterval { get; set; }
public SpeedrunCom.Record WorldRecord { get; protected set; }

private bool NeedsInvalidation { get; set; }

public string ComponentName
{
get { return "World Record"; }
Expand Down Expand Up @@ -99,6 +101,7 @@ private void ShowWorldRecord()
var time = TimeFormatter.Format(WorldRecord.Time[timingMethod]);
var runners = WorldRecord.Runners.Aggregate((a, b) => a + " & " + b);
InternalComponent.InformationValue = string.Format("{0} by {1}", time, runners);
NeedsInvalidation = true;
}
else
{
Expand Down Expand Up @@ -128,6 +131,12 @@ public void Update(IInvalidator invalidator, LiveSplitState state, float width,
}

InternalComponent.Update(invalidator, state, width, height, mode);

if (NeedsInvalidation)
{
invalidator.Invalidate(0, 0, width, height);
NeedsInvalidation = false;
}
}

private void DrawBackground(Graphics g, LiveSplitState state, float width, float height)
Expand Down
2 changes: 1 addition & 1 deletion UI/Components/WorldRecordFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public string UpdateURL

public Version Version
{
get { return Version.Parse("1.5.2"); }
get { return Version.Parse("0.5"); }
}
}
}

0 comments on commit 662e90e

Please sign in to comment.