You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Pass mouse position to Input singleton in web export
(cherry picked from commit 4beeff9433)
This commit is contained in:
@@ -415,6 +415,9 @@ void OS_JavaScript::push_input(const InputEvent& p_ev) {
|
|||||||
|
|
||||||
InputEvent ev = p_ev;
|
InputEvent ev = p_ev;
|
||||||
ev.ID=last_id++;
|
ev.ID=last_id++;
|
||||||
|
if (ev.type==InputEvent::MOUSE_MOTION) {
|
||||||
|
input->set_mouse_pos(Point2(ev.mouse_motion.x, ev.mouse_motion.y));
|
||||||
|
}
|
||||||
input->parse_input_event(p_ev);
|
input->parse_input_event(p_ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user