Allow to adjust slider velocity on multiple objects simultaneously

This commit is contained in:
Bartłomiej Dach
2021-11-12 22:54:27 +01:00
parent b8b86cbd2a
commit e55e2a1697
3 changed files with 151 additions and 17 deletions

View File

@ -136,7 +136,7 @@ namespace osu.Game.Tests.Visual.Editing
private void velocityPopoverHasSingleValue(double velocity) => AddUntilStep($"velocity popover has {velocity}", () =>
{
var popover = this.ChildrenOfType<DifficultyPointPiece.DifficultyEditPopover>().SingleOrDefault();
var slider = popover?.ChildrenOfType<SliderWithTextBoxInput<double>>().Single();
var slider = popover?.ChildrenOfType<IndeterminateSliderWithTextBoxInput<double>>().Single();
return slider?.Current.Value == velocity;
});
@ -144,7 +144,7 @@ namespace osu.Game.Tests.Visual.Editing
private void velocityPopoverHasIndeterminateValue() => AddUntilStep("velocity popover has indeterminate value", () =>
{
var popover = this.ChildrenOfType<DifficultyPointPiece.DifficultyEditPopover>().SingleOrDefault();
var slider = popover?.ChildrenOfType<SliderWithTextBoxInput<double>>().Single();
var slider = popover?.ChildrenOfType<IndeterminateSliderWithTextBoxInput<double>>().Single();
return slider != null && slider.Current.Value == null;
});
@ -158,7 +158,7 @@ namespace osu.Game.Tests.Visual.Editing
private void setVelocityViaPopover(double velocity) => AddStep($"set {velocity} via popover", () =>
{
var popover = this.ChildrenOfType<DifficultyPointPiece.DifficultyEditPopover>().Single();
var slider = popover.ChildrenOfType<SliderWithTextBoxInput<double>>().Single();
var slider = popover.ChildrenOfType<IndeterminateSliderWithTextBoxInput<double>>().Single();
slider.Current.Value = velocity;
});