2D_Game_Engine
Loading...
Searching...
No Matches
input.cpp
Go to the documentation of this file.
1#include <pch.hpp>
2#include <input.hpp>
3#include <window.hpp>
4
6 for(auto &key:m_KeyStates){
7 key.second.previous=key.second.current;
8 key.second.current=glfwGetKey(Window::Window,key.first);
9 }
10
11 for(auto &button:m_MouseStates){
12 button.second.previous=button.second.current;
13 button.second.current=glfwGetMouseButton(Window::Window,button.first);
14 }
15}
16
void UpdateStates()
Definition input.cpp:5
Vec2 GetMousePosition()
Definition input.cpp:17
GLFWwindow * Window
Definition window.cpp:225
float Height
Definition window.hpp:43
const float MAX_WIDTH
Definition window.cpp:251
float Width
Definition window.cpp:227
float MAX_HEIGHT
Definition window.cpp:252
std::string key