2017-02-07 12:59:30 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
2016-10-26 17:45:48 +08:00
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2017-08-22 13:44:13 +08:00
|
|
|
|
using osu.Framework.Input.Bindings;
|
|
|
|
|
using osu.Game.Input.Bindings;
|
2016-10-26 17:45:48 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Graphics.UserInterface.Volume
|
|
|
|
|
{
|
2017-08-22 13:44:13 +08:00
|
|
|
|
internal class VolumeControlReceptor : Container, IKeyBindingHandler<GlobalAction>
|
2016-10-26 17:45:48 +08:00
|
|
|
|
{
|
2017-08-22 13:44:13 +08:00
|
|
|
|
public Func<GlobalAction, bool> ActionRequested;
|
2016-10-26 17:45:48 +08:00
|
|
|
|
|
2017-08-22 13:44:13 +08:00
|
|
|
|
public bool OnPressed(GlobalAction action) => ActionRequested?.Invoke(action) ?? false;
|
|
|
|
|
public bool OnReleased(GlobalAction action) => false;
|
2016-10-26 17:45:48 +08:00
|
|
|
|
}
|
|
|
|
|
}
|