global mouse moved to state and removed some GetMousePosition()s.

This commit is contained in:
Sebastian
2024-11-14 01:37:16 +01:00
parent 5d3b72d4ef
commit 2e103dc561
10 changed files with 58 additions and 60 deletions
+1 -2
View File
@@ -17,10 +17,9 @@ namespace VISEQ::BASE {
bool picked_up = false;
virtual bool pickedUp() {
Vec2Df mp = {GetMousePosition().x, GetMousePosition().y};
if(clicked() && held()) {
picked_up = true;
drag_offset = position - mp;
drag_offset = position - state->raw_mouse;
}
return picked_up;
}