use KeyCode MouseButton replace int
This commit is contained in:
@ -8,14 +8,14 @@
|
||||
|
||||
namespace Hazel
|
||||
{
|
||||
bool Input::IsKeyPressed(const int key)
|
||||
bool Input::IsKeyPressed(const KeyCode key)
|
||||
{
|
||||
const auto state = SDL_GetKeyboardState(nullptr);
|
||||
|
||||
return state[key];
|
||||
}
|
||||
|
||||
bool Input::IsMouseButtonPressed(const int button)
|
||||
bool Input::IsMouseButtonPressed(const MouseButton button)
|
||||
{
|
||||
const auto mod = SDL_GetMouseState(nullptr, nullptr);
|
||||
return mod & SDL_BUTTON_MASK(button);
|
||||
|
||||
Reference in New Issue
Block a user