1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:42:57 +08:00

Add a percentage-based slider testcase.

This commit is contained in:
Dean Herbert 2017-04-20 19:16:47 +09:00
parent 4e1942f998
commit 86c60ade85
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -20,6 +20,9 @@ namespace osu.Desktop.VisualTests.Tests
{
base.Reset();
OsuSliderBar<int> slider;
OsuSliderBar<double> sliderDouble;
const float width = 400;
Children = new Drawable[]
{
@ -27,19 +30,23 @@ namespace osu.Desktop.VisualTests.Tests
{
RelativeSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0,10),
Spacing = new Vector2(0, 10),
Children = new Drawable[]
{
new TooltipTextContainer("text with a tooltip"),
new TooltipTextContainer("more text with another tooltip"),
new TooltipTextbox
{
Text = "a box with a tooltip",
Size = new Vector2(300,30),
Text = "a textbox with a tooltip",
Size = new Vector2(width,30),
},
slider = new OsuSliderBar<int>
{
Width = 300,
Width = width,
},
sliderDouble = new OsuSliderBar<double>
{
Width = width,
},
},
},
@ -50,6 +57,12 @@ namespace osu.Desktop.VisualTests.Tests
MaxValue = 10,
MinValue = 0
});
sliderDouble.Current.BindTo(new BindableDouble(0.5)
{
MaxValue = 1,
MinValue = 0
});
}
private class TooltipTextContainer : Container, IHasTooltip