mirror of
https://github.com/ppy/osu.git
synced 2025-03-06 14:37:21 +08:00
Fix replay playback speed not being displayed initially
This commit is contained in:
parent
ca470ffaf0
commit
cebeb0a219
@ -19,10 +19,10 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
|
|
||||||
private readonly PlayerSliderBar<double> sliderbar;
|
private readonly PlayerSliderBar<double> sliderbar;
|
||||||
|
|
||||||
|
private readonly OsuSpriteText multiplierText;
|
||||||
|
|
||||||
public PlaybackSettings()
|
public PlaybackSettings()
|
||||||
{
|
{
|
||||||
OsuSpriteText multiplierText;
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Container
|
new Container
|
||||||
@ -57,9 +57,6 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
sliderbar.Bindable.ValueChanged += rateMultiplier => multiplierText.Text = $"{sliderbar.Bar.TooltipText}x";
|
|
||||||
sliderbar.Bindable.TriggerChange();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
@ -70,7 +67,12 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var clockRate = AdjustableClock.Rate;
|
var clockRate = AdjustableClock.Rate;
|
||||||
sliderbar.Bindable.ValueChanged += rateMultiplier => AdjustableClock.Rate = clockRate * rateMultiplier;
|
|
||||||
|
sliderbar.Bindable.BindValueChanged(multiplier =>
|
||||||
|
{
|
||||||
|
multiplierText.Text = $"{multiplier:0.0}x";
|
||||||
|
AdjustableClock.Rate = clockRate * multiplier;
|
||||||
|
}, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user