sasalka/Code/Sounds/MusicPlayerNextButton.cs
2025-05-27 00:59:12 +03:00

46 lines
1.0 KiB
C#

namespace Sandbox;
[Icon( "skip_next" )]
public sealed class MusicPlayerNextButton : Component, Component.IPressable
{
[Property] public string Label { get; set; } = "Next track";
public bool Press( Component.IPressable.Event e )
{
Log.Info( $"Press от {e.Source}" );
return true;
}
public void Hover( Component.IPressable.Event e )
{
Log.Info( $"Hover от {e.Source}" );
}
public void Look( Component.IPressable.Event e )
{
Log.Info( "Look..." );
}
public void Blur( Component.IPressable.Event e )
{
Log.Info( "Blur — игрок отвёл взгляд" );
}
public void Release( Component.IPressable.Event e )
{
Log.Info( "Release — игрок отпустил кнопку" );
}
public bool Pressing( Component.IPressable.Event e )
{
// возвращаем true, чтобы удержание продолжалось
return true;
}
public bool CanPress( Component.IPressable.Event e )
{
// например, можно сделать: return !isCoolingDown
return true;
}
}