1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-31 00:02:56 +08:00
osu-lazer/osu.Game.Tests/Visual/UserInterface/TestSceneVolumeOverlay.cs

35 lines
1011 B
C#
Raw Normal View History

2021-07-07 19:51:13 +08:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2022-06-17 15:37:17 +08:00
#nullable disable
2021-07-07 19:51:13 +08:00
using osu.Framework.Graphics;
using osu.Game.Overlays;
using osu.Game.Overlays.Volume;
namespace osu.Game.Tests.Visual.UserInterface
{
2022-11-24 13:32:20 +08:00
public partial class TestSceneVolumeOverlay : OsuTestScene
2021-07-07 19:51:13 +08:00
{
private VolumeOverlay volume;
protected override void LoadComplete()
{
base.LoadComplete();
AddRange(new Drawable[]
{
volume = new VolumeOverlay(),
new VolumeControlReceptor
{
RelativeSizeAxes = Axes.Both,
ActionRequested = action => volume.Adjust(action),
ScrollActionRequested = (action, amount, isPrecise) => volume.Adjust(action, amount, isPrecise),
},
});
AddStep("show controls", () => volume.Show());
}
}
}