using Microsoft.Xna.Framework.Input;
using Protogame;

namespace SuperBallBrawlers
{
    public class DesktopEventBinder : StaticEventBinder<IGameContext>
    {
        public override void Configure()
        {
            Bind<GamePadButtonPressEvent>(x => x.Button == Buttons.Start).To<StartGameAction>();
            Bind<KeyPressEvent>(x => x.Key == Keys.Enter).To<StartGameAction>();
            Bind<GamePadThumbstickActiveEvent>(x => x.GamePadState.IsConnected).ToAllComponentizedEntities();
            Bind<KeyHeldEvent>(x => true).ToAllComponentizedEntities();
        }
    }
}
