Skip to content

Commit

Permalink
Merge pull request #2 from cartersoft/feature/initial-hit
Browse files Browse the repository at this point in the history
more tweaks
  • Loading branch information
cartersoft authored Jun 10, 2022
2 parents d69eebf + eb989d1 commit 0e2f90a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions LiveSplit.RunCounter/UI/Components/RunCounterComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class RunCounterComponent : IComponent
protected LiveSplitState CurrentState { get; set; }
public string ComponentName => "Run Counter";
private int counterValue = 0;
private string counterField = "xx Runs: ";
private string counterField = "xx Runs";

public float HorizontalWidth => InternalComponent.HorizontalWidth;
public float MinimumWidth => InternalComponent.MinimumWidth;
Expand All @@ -34,7 +34,7 @@ public RunCounterComponent(LiveSplitState state)
{
Settings = new RunCounterSettings();
Cache = new GraphicsCache();
InternalComponent = new InfoTextComponent("xx Runs: ", "0");
InternalComponent = new InfoTextComponent("xx Runs", "0");
CurrentState = state;
}

Expand Down Expand Up @@ -133,7 +133,9 @@ private int GetSimilarTimeCount(Attempt pbAttempt)
string pbhour = pbAttempt.Duration.Value.Hours.ToString(); // get the hour value (for long pbs)
string pbmin = pbAttempt.Duration.Value.Minutes.ToString(); // get the min value (for all pbs)

counterField = pbhour + ":" + pbmin + ":xx Runs: ";
counterField = (pbhour.Length.Equals(1) ? (pbhour.Equals("0") ? "" : "0" + pbhour + ":") : pbhour);
counterField += (pbmin.Length.Equals(1) ? (pbmin.Equals("0") ? "" : "0" + pbmin) : pbmin);
counterField += ":xx's";

foreach (Attempt attempt in CurrentState.Run.AttemptHistory) {

Expand Down

0 comments on commit 0e2f90a

Please sign in to comment.