Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qubqub committed Aug 27, 2023
1 parent d1fe976 commit bf472ec
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Views/Overlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -585,14 +585,14 @@ private void SetQualifyChanceLabel(StatSummary levelInfo) {
this.lblQualifyChance.Text = $"{Multilingual.GetWord("overlay_qualify_chance")} :";
qualifyChance = levelInfo.TotalQualify * 100f / (levelInfo.TotalPlays == 0 ? 1 : levelInfo.TotalPlays);
qualifyChanceDisplay = this.StatsForm.CurrentSettings.HideOverlayPercentages ? string.Empty : $" - {qualifyChance:0.0}%";
qualifyDisplay = $"{levelInfo.TotalQualify}{(levelInfo.TotalPlays < 1000 ? " / " + levelInfo.TotalPlays : Multilingual.GetWord("overlay_inning"))}";
qualifyDisplay = $"{levelInfo.TotalQualify}{(levelInfo.TotalPlays < 100000 ? " / " + levelInfo.TotalPlays : Multilingual.GetWord("overlay_inning"))}";
this.lblQualifyChance.TextRight = $"{qualifyDisplay}{qualifyChanceDisplay}";
break;
case 1:
this.lblQualifyChance.Text = $"{Multilingual.GetWord("overlay_qualify_gold")} :";
qualifyChance = levelInfo.TotalGolds * 100f / (levelInfo.TotalPlays == 0 ? 1 : levelInfo.TotalPlays);
qualifyChanceDisplay = this.StatsForm.CurrentSettings.HideOverlayPercentages ? string.Empty : $" - {qualifyChance:0.0}%";
qualifyDisplay = $"{levelInfo.TotalGolds}{(levelInfo.TotalPlays < 1000 ? " / " + levelInfo.TotalPlays : Multilingual.GetWord("overlay_inning"))}";
qualifyDisplay = $"{levelInfo.TotalGolds}{(levelInfo.TotalPlays < 100000 ? " / " + levelInfo.TotalPlays : Multilingual.GetWord("overlay_inning"))}";
this.lblQualifyChance.TextRight = $"{qualifyDisplay}{qualifyChanceDisplay}";
break;
}
Expand Down Expand Up @@ -796,11 +796,13 @@ private void UpdateInfo() {
if (this.StatsForm.CurrentSettings.PreviousWins > 0) {
this.lblWins.TextRight = $"{levelInfo.TotalWins} ({levelInfo.AllWins + this.StatsForm.CurrentSettings.PreviousWins}){winChanceDisplay}";
} else {
this.lblWins.TextRight = $"{levelInfo.TotalWins}{(this.StatsForm.CurrentSettings.FilterType != 1 ? $" ({levelInfo.AllWins})" : "")}{winChanceDisplay}";
this.lblWins.TextRight = this.StatsForm.CurrentSettings.FilterType != 1
? $"{levelInfo.TotalWins} ({levelInfo.AllWins}){winChanceDisplay}"
: $"{levelInfo.TotalWins}{winChanceDisplay}";
}

this.lblFinals.Text = $"{Multilingual.GetWord("overlay_finals")} :";
string finalText = $"{levelInfo.TotalFinals}{(levelInfo.TotalShows < 1000 ? " / " + levelInfo.TotalShows : Multilingual.GetWord("overlay_inning"))}";
string finalText = $"{levelInfo.TotalFinals}{(levelInfo.TotalShows < 100000 ? " / " + levelInfo.TotalShows : Multilingual.GetWord("overlay_inning"))}";
float finalChance = levelInfo.TotalFinals * 100f / (levelInfo.TotalShows == 0 ? 1 : levelInfo.TotalShows);
string finalChanceDisplay = this.StatsForm.CurrentSettings.HideOverlayPercentages ? string.Empty : finalText.Length > 9 ? $" - {finalChance:0}%" : $" - {finalChance:0.0}%";
this.lblFinals.TextRight = $"{finalText}{finalChanceDisplay}";
Expand Down

0 comments on commit bf472ec

Please sign in to comment.