#include "engine/window.h"
#include "engine/input_manager.h"

bool InputManager::keyDown = false;

std::vector<SDL_Event> &InputManager::getFrameEvents() {
    static std::vector<SDL_Event> frame_events;
    return frame_events;
}

void InputManager::windowEscape() {
    for (SDL_Event e: InputManager::getFrameEvents()) {
        if (e.type == SDL_KEYDOWN) {
            if (e.key.keysym.sym == SDLK_ESCAPE) {
                Window::isRunning = false;
            }
        }
    }
}