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
9
class
AnvilInput
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
};
AnvilInput
A static class for handling keyboard input using GLFW.
Definition
AnvilInput.h:10
AnvilInput::IsKeyPressed
static bool IsKeyPressed(int key)
Checks if a specific key is currently pressed.
Definition
AnvilInput.h:17
Anvil_SDK
AnvilInput.h
Generated by
1.16.1