1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 18:20:34 +08:00
osu-lazer/osu.Game/Graphics/UserInterface/Volume/VolumeControlReceptor.cs
Dean Herbert 18645fcf29 Update volume control logic to use key bindings
Fixes them not working at all, too.
2017-08-22 14:48:04 +09:00

19 lines
663 B
C#

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Bindings;
using osu.Game.Input.Bindings;
namespace osu.Game.Graphics.UserInterface.Volume
{
internal class VolumeControlReceptor : Container, IKeyBindingHandler<GlobalAction>
{
public Func<GlobalAction, bool> ActionRequested;
public bool OnPressed(GlobalAction action) => ActionRequested?.Invoke(action) ?? false;
public bool OnReleased(GlobalAction action) => false;
}
}