1#include "../editor/Application.h"
2#include "InputHandler.h"
3#include "common/maths/Vec.h"
7 GLFWwindow* window = Application::GetInstance()->GetWindow().GetGLFWWindow();
8 int state = glfwGetKey(window, key);
10 return state == GLFW_PRESS || state == GLFW_REPEAT;
15 GLFWwindow* window = Application::GetInstance()->GetWindow().GetGLFWWindow();
17 glfwGetCursorPos(window, &xpos, &ypos);
24 GLFWwindow* window = Application::GetInstance()->GetWindow().GetGLFWWindow();
25 int state = glfwGetMouseButton(window, button);
27 return state == GLFW_PRESS;
33 mousePos.x -= Application::GetInstance()->GetWindow().GetViewportPosition().x;
34 mousePos.y -= Application::GetInstance()->GetWindow().GetViewportPosition().y;
35 mousePos.y = Application::GetInstance()->GetWindow().GetViewportHeight() - mousePos.y;