X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?p=physics.git;a=blobdiff_plain;f=src%2Finput%2FinputManager.cpp;h=0df4baad73e9e249e46c156c23627a59d8bddffa;hp=a8491b141561a778fd29930dd2ef89afcb3a41a4;hb=a823a80039c6069bb7676433832d9f9413494860;hpb=46e842c7cc2e977f9bdd9fb4480dac26163fa25b diff --git a/src/input/inputManager.cpp b/src/input/inputManager.cpp index a8491b1..0df4baa 100644 --- a/src/input/inputManager.cpp +++ b/src/input/inputManager.cpp @@ -72,6 +72,16 @@ void input::update() } } +Vector2 input::mousePosition() +{ + int x; + int y; + + SDL_GetMouseState(&x, &y); + + return Vector2(x,y); +} + bool input::isPressed(Uint8 key) { return keyState[key] == isP || keyState[key] == wasP;