mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
basic volume meter and testcase
This commit is contained in:
29
osu.Game.Tests/Visual/TestCaseVolumeControl.cs
Normal file
29
osu.Game.Tests/Visual/TestCaseVolumeControl.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Overlays.Volume;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public class TestCaseVolumeControl : TestCase
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(VolumeMeter), typeof(MuteButton) };
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio, OsuColour colours)
|
||||
{
|
||||
VolumeMeter meter;
|
||||
Add(meter = new VolumeMeter("MASTER", 125, colours.PinkDarker));
|
||||
Add(new MuteButton
|
||||
{
|
||||
Margin = new MarginPadding { Top = 200 }
|
||||
});
|
||||
|
||||
meter.Bindable.BindTo(audio.Volume);
|
||||
}
|
||||
}
|
||||
}
|
@ -162,6 +162,7 @@
|
||||
<Compile Include="Visual\TestCaseUserPanel.cs" />
|
||||
<Compile Include="Visual\TestCaseUserProfile.cs" />
|
||||
<Compile Include="Visual\TestCaseUserRanks.cs" />
|
||||
<Compile Include="Visual\TestCaseVolumeControl.cs" />
|
||||
<Compile Include="Visual\TestCaseWaveform.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
Reference in New Issue
Block a user