Change the way VolumeControl handles global input.

This commit is contained in:
Dean Herbert 2016-10-16 18:39:10 +09:00
parent 620c4e6ab7
commit 02dc8dc167

View File

@ -4,10 +4,11 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input; using osu.Framework.Input;
using OpenTK; using OpenTK;
using osu.Framework.Graphics.Primitives;
namespace osu.Game namespace osu.Game
{ {
internal class VolumeControl : Container internal class VolumeControl : AutoSizeContainer
{ {
private FlowContainer volumeMetersContainer; private FlowContainer volumeMetersContainer;
private VolumeMeter volumeMeterMaster; private VolumeMeter volumeMeterMaster;
@ -15,14 +16,14 @@ namespace osu.Game
public BindableDouble VolumeSample { get; set; } public BindableDouble VolumeSample { get; set; }
public BindableDouble VolumeTrack { get; set; } public BindableDouble VolumeTrack { get; set; }
public VolumeControl() public override bool Contains(Vector2 screenSpacePos) => true;
{
RelativeSizeAxes = Axes.Both;
}
private void volumeChanged(object sender, System.EventArgs e) private void volumeChanged(object sender, System.EventArgs e)
{ {
appear(); appear();
Anchor = Anchor.BottomRight;
Origin = Anchor.BottomRight;
} }
public override void Load(BaseGame game) public override void Load(BaseGame game)