osu/osu.Game.Tests/Visual/TestCaseVolumePieces.cs

33 lines
990 B
C#
Raw Normal View History

// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
2018-02-28 15:14:52 +00:00
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Graphics;
using osu.Framework.Testing;
using osu.Game.Overlays.Volume;
using OpenTK.Graphics;
2018-02-28 15:14:52 +00:00
namespace osu.Game.Tests.Visual
{
2018-03-03 18:08:35 +00:00
public class TestCaseVolumePieces : TestCase
2018-02-28 15:14:52 +00:00
{
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(VolumeMeter), typeof(MuteButton) };
[BackgroundDependencyLoader]
private void load(AudioManager audio)
2018-02-28 15:14:52 +00:00
{
VolumeMeter meter;
Add(meter = new VolumeMeter("MASTER", 125, Color4.Blue));
2018-02-28 15:14:52 +00:00
Add(new MuteButton
{
Margin = new MarginPadding { Top = 200 }
});
meter.Bindable.BindTo(audio.Volume);
}
}
}