#include "input.h"

#include <GLFW/glfw3.h>
#include <imgui.h>

extern GLFWwindow* window;

namespace Input
{
    bool IsKeyDown(Keycode key)
    {
        return glfwGetKey(window, static_cast<int>(key)) == GLFW_PRESS;
    }

    core::types::Vec2  GetMousePosition()
    {
        ImVec2 p = ImGui::GetMousePos();
        return core::types::Vec2 { p.x, p.y };
    }
}
