// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using osu.Framework.Graphics; namespace osu.Game.Screens.Play.HUD { /// /// An event trigger which can be used with to create visual tracking of button/key presses. /// public abstract partial class InputTrigger : Component { public event Action? OnActivate; public event Action? OnDeactivate; protected InputTrigger(string name) { Name = name; } protected void Activate(bool forwardPlayback = true) => OnActivate?.Invoke(forwardPlayback); protected void Deactivate(bool forwardPlayback = true) => OnDeactivate?.Invoke(forwardPlayback); } }