1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-16 04:27:52 +08:00
osu-lazer/osu.Game.Tests/Visual/UserInterface/TestSceneVolumePieces.cs

45 lines
1.4 KiB
C#
Raw Normal View History

// 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.
2018-04-13 17:19:50 +08:00
using osu.Framework.Graphics;
using osu.Game.Overlays.Volume;
2018-11-20 15:51:59 +08:00
using osuTK;
using osuTK.Graphics;
2018-04-13 17:19:50 +08:00
2019-03-25 00:02:36 +08:00
namespace osu.Game.Tests.Visual.UserInterface
2018-04-13 17:19:50 +08:00
{
2022-11-24 13:32:20 +08:00
public partial class TestSceneVolumePieces : OsuTestScene
2018-04-13 17:19:50 +08:00
{
protected override void LoadComplete()
{
VolumeMeter meter;
MuteButton mute;
2024-01-17 13:28:47 +08:00
Add(meter = new VolumeMeter("MASTER", 125, Color4.Green) { Position = new Vector2(10) });
AddSliderStep("master volume", 0, 10, 0, i => meter.Bindable.Value = i * 0.1);
Add(new VolumeMeter("BIG", 250, Color4.Red)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Position = new Vector2(10),
2024-01-17 13:28:47 +08:00
Margin = new MarginPadding { Left = 250 },
});
Add(new VolumeMeter("SML", 125, Color4.Blue)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Position = new Vector2(10),
Margin = new MarginPadding { Right = 500 },
});
2018-04-13 17:19:50 +08:00
Add(mute = new MuteButton
{
Margin = new MarginPadding { Top = 200 }
});
AddToggleStep("mute", b => mute.Current.Value = b);
}
}
}