Only show preempt time when limits are extended

This commit is contained in:
Bartłomiej Dach 2023-09-07 08:30:02 +02:00
parent bd633889e7
commit 323a4f4522
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

View File

@ -77,7 +77,9 @@ protected override RoundedSliderBar<float> CreateSlider(BindableNumber<float> cu
public partial class ApproachRateSlider : RoundedSliderBar<float>
{
public override LocalisableString TooltipText =>
$"{base.TooltipText} ({getPreemptTime(Current.Value):0} ms)";
(Current as BindableNumber<float>)?.MinValue < 0
? $"{base.TooltipText} ({getPreemptTime(Current.Value):0} ms)"
: base.TooltipText;
private double getPreemptTime(float approachRate)
{