From 662e90ea9930a41b853319db522a3674c12e5a28 Mon Sep 17 00:00:00 2001 From: Christopher Serr Date: Sat, 13 Jun 2015 15:20:33 +0200 Subject: [PATCH] Made some adjustments to get it to work on 1.5 --- UI/Components/WorldRecordComponent.cs | 9 +++++++++ UI/Components/WorldRecordFactory.cs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/UI/Components/WorldRecordComponent.cs b/UI/Components/WorldRecordComponent.cs index b852387..335f031 100644 --- a/UI/Components/WorldRecordComponent.cs +++ b/UI/Components/WorldRecordComponent.cs @@ -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"; } @@ -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 { @@ -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) diff --git a/UI/Components/WorldRecordFactory.cs b/UI/Components/WorldRecordFactory.cs index b8b279f..bd13690 100644 --- a/UI/Components/WorldRecordFactory.cs +++ b/UI/Components/WorldRecordFactory.cs @@ -53,7 +53,7 @@ public string UpdateURL public Version Version { - get { return Version.Parse("1.5.2"); } + get { return Version.Parse("0.5"); } } } }