projects
/
physics.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
gravity well now follows the mouse
[physics.git]
/
src
/
input
/
inputManager.cpp
diff --git
a/src/input/inputManager.cpp
b/src/input/inputManager.cpp
index
a8491b1
..
0df4baa
100644
(file)
--- 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;