Anvil Engine
Loading...
Searching...
No Matches
AnvilInput.h
Go to the documentation of this file.
1#pragma once
2#include <glfw/glfw3.h>
3#include <map>
4
10{
11 public:
17 static bool IsKeyPressed(int key)
18 {
19 auto window = glfwGetCurrentContext(); // Get the current GLFW window context
20 return glfwGetKey(window, key) == GLFW_PRESS; // Check if the key is in the pressed state
21 }
22};
A static class for handling keyboard input using GLFW.
Definition AnvilInput.h:10
static bool IsKeyPressed(int key)
Checks if a specific key is currently pressed.
Definition AnvilInput.h:17