mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Bring VisualTests up-to-date.
This commit is contained in:
@ -6,6 +6,7 @@ using osu.Framework.Graphics;
|
||||
using OpenTK.Input;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.MathUtils;
|
||||
@ -37,19 +38,30 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
};
|
||||
BindableInt bindable = new BindableInt { MinValue = 0, MaxValue = 200, Default = 50 };
|
||||
bindable.ValueChanged += delegate { kc.FadeTime = bindable.Value; };
|
||||
AddButton("Add Random", () =>
|
||||
AddStep("Add Random", () =>
|
||||
{
|
||||
Key key = (Key)((int)Key.A + RNG.Next(26));
|
||||
kc.Add(new KeyCounterKeyboard(key));
|
||||
});
|
||||
ButtonsContainer.Add(new SpriteText { Text = "FadeTime" });
|
||||
ButtonsContainer.Add(new TestSliderBar<int>
|
||||
|
||||
Add(new Container
|
||||
{
|
||||
Width = 150,
|
||||
Height = 10,
|
||||
SelectionColor = Color4.Orange,
|
||||
Bindable = bindable
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SpriteText { Text = "FadeTime" },
|
||||
new TestSliderBar<int>
|
||||
{
|
||||
Width = 150,
|
||||
Height = 10,
|
||||
SelectionColor = Color4.Orange,
|
||||
Bindable = bindable
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Add(kc);
|
||||
}
|
||||
private class TestSliderBar<T> : SliderBar<T> where T : struct
|
||||
|
Reference in New Issue
Block a user