using Godot;
using Mr.BrickAdventures.Autoloads;

namespace Mr.BrickAdventures.scripts.UI;

public partial class Credits : Control
{
    private UIManager UIManager => UIManager.Instance;

    public override void _UnhandledInput(InputEvent @event)
    {
        if (!@event.IsActionPressed("ui_cancel")) return;
        if (UIManager != null && UIManager.IsScreenOnTop(this))
        {
            UIManager.PopScreen();
        }
    }
}