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