diff --git a/UI/ColumnType.cs b/UI/ColumnType.cs index 3d32ce6..e5c6194 100644 --- a/UI/ColumnType.cs +++ b/UI/ColumnType.cs @@ -2,6 +2,6 @@ { public enum ColumnType { - Delta, SplitTime, DeltaorSplitTime, SegmentDelta, SegmentTime, SegmentDeltaorSegmentTime + Delta, SplitTime, DeltaorSplitTime, SegmentDelta, SegmentTime, SegmentDeltaorSegmentTime, BestTime } } diff --git a/UI/Components/ColumnSettings.Designer.cs b/UI/Components/ColumnSettings.Designer.cs index 5c3a4d7..5be259b 100644 --- a/UI/Components/ColumnSettings.Designer.cs +++ b/UI/Components/ColumnSettings.Designer.cs @@ -137,7 +137,8 @@ private void InitializeComponent() "Delta or Split Time", "Segment Delta", "Segment Time", - "Segment Delta or Segment Time"}); + "Segment Delta or Segment Time", + "Best Time"}); this.cmbColumnType.Location = new System.Drawing.Point(93, 33); this.cmbColumnType.Name = "cmbColumnType"; this.cmbColumnType.Size = new System.Drawing.Size(325, 21); diff --git a/UI/Components/ColumnSettings.cs b/UI/Components/ColumnSettings.cs index c70a8c1..1dc843a 100644 --- a/UI/Components/ColumnSettings.cs +++ b/UI/Components/ColumnSettings.cs @@ -114,8 +114,10 @@ private static string GetColumnType(ColumnType type) return "Segment Time"; else if (type == ColumnType.SegmentDelta) return "Segment Delta"; - else + else if (type == ColumnType.SegmentDeltaorSegmentTime) return "Segment Delta or Segment Time"; + else + return "Best Time"; } private static ColumnType ParseColumnType(string columnType) diff --git a/UI/Components/SplitComponent.cs b/UI/Components/SplitComponent.cs index cdf6f9f..db11096 100644 --- a/UI/Components/SplitComponent.cs +++ b/UI/Components/SplitComponent.cs @@ -468,6 +468,12 @@ protected void UpdateColumn(LiveSplitState state, SimpleLabel label, ColumnData label.Text = ""; } } + + if (type == ColumnType.BestTime) + { + label.ForeColor = Settings.OverrideTimesColor ? Settings.BeforeTimesColor : state.LayoutSettings.TextColor; + label.Text = TimeFormatter.Format(Split.Comparisons[Run.PersonalBestComparisonName][timingMethod]); + } } protected float CalculateLabelsWidth() @@ -476,7 +482,7 @@ protected float CalculateLabelsWidth() { var mixedCount = ColumnsList.Count(x => x.Type == ColumnType.DeltaorSplitTime || x.Type == ColumnType.SegmentDeltaorSegmentTime); var deltaCount = ColumnsList.Count(x => x.Type == ColumnType.Delta || x.Type == ColumnType.SegmentDelta); - var timeCount = ColumnsList.Count(x => x.Type == ColumnType.SplitTime || x.Type == ColumnType.SegmentTime); + var timeCount = ColumnsList.Count(x => x.Type == ColumnType.SplitTime || x.Type == ColumnType.SegmentTime || x.Type == ColumnType.BestTime); return mixedCount * (Math.Max(MeasureDeltaLabel.ActualWidth, MeasureTimeLabel.ActualWidth) + 5) + deltaCount * (MeasureDeltaLabel.ActualWidth + 5) + timeCount * (MeasureTimeLabel.ActualWidth + 5);