From 4beeff94335938ba0249aea69c4e47024b08bf64 Mon Sep 17 00:00:00 2001 From: eska Date: Fri, 8 Jul 2016 20:09:25 +0200 Subject: [PATCH] Pass mouse position to Input singleton in web export --- platform/javascript/os_javascript.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 2e42e79996c..1defcb7cb2c 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -415,6 +415,9 @@ void OS_JavaScript::push_input(const InputEvent& p_ev) { InputEvent ev = p_ev; 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); }