- Afegit soport per a ratolí
This commit is contained in:
@@ -46,4 +46,22 @@ namespace input
|
||||
keypressed = key;
|
||||
}
|
||||
|
||||
int mouseX()
|
||||
{
|
||||
int x;
|
||||
SDL_GetMouseState(&x, NULL);
|
||||
return x;
|
||||
}
|
||||
|
||||
int mouseY()
|
||||
{
|
||||
int y;
|
||||
SDL_GetMouseState(NULL, &y);
|
||||
return y;
|
||||
}
|
||||
|
||||
bool mouseBtn(int btn)
|
||||
{
|
||||
return (SDL_GetMouseState(NULL, NULL) & SDL_BUTTON(btn));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user