2018-01-05 19:21:19 +08:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-02-07 12:59:30 +08:00
|
|
|
|
// 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;
|
2018-01-11 18:03:31 +08:00
|
|
|
|
using osu.Framework.Input;
|
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
|
|
|
|
|
2018-03-04 02:08:35 +08:00
|
|
|
|
namespace osu.Game.Overlays.Volume
|
2016-10-26 17:45:48 +08:00
|
|
|
|
{
|
2018-01-11 18:03:31 +08:00
|
|
|
|
public class VolumeControlReceptor : Container, IKeyBindingHandler<GlobalAction>, IHandleGlobalInput
|
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
|
|
|
|
}
|
|
|
|
|
}
|