diff options
-rw-r--r-- | core/os/input.cpp | 2 | ||||
-rw-r--r-- | core/os/input.h | 2 | ||||
-rw-r--r-- | main/input_default.cpp | 2 | ||||
-rw-r--r-- | main/input_default.h | 2 | ||||
-rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 4 | ||||
-rw-r--r-- | platform/android/os_android.cpp | 4 | ||||
-rw-r--r-- | platform/bb10/os_bb10.cpp | 4 | ||||
-rw-r--r-- | platform/haiku/haiku_direct_window.cpp | 4 | ||||
-rw-r--r-- | platform/javascript/os_javascript.cpp | 4 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 4 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 4 |
11 files changed, 18 insertions, 18 deletions
diff --git a/core/os/input.cpp b/core/os/input.cpp index d2bd433ed9..acfd5ba540 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -74,7 +74,7 @@ void Input::_bind_methods() { ClassDB::bind_method(_MD("get_magnetometer"),&Input::get_magnetometer); ClassDB::bind_method(_MD("get_gyroscope"),&Input::get_gyroscope); //ClassDB::bind_method(_MD("get_mouse_pos"),&Input::get_mouse_pos); - this is not the function you want - ClassDB::bind_method(_MD("get_mouse_speed"),&Input::get_mouse_speed); + ClassDB::bind_method(_MD("get_last_mouse_speed"),&Input::get_last_mouse_speed); ClassDB::bind_method(_MD("get_mouse_button_mask"),&Input::get_mouse_button_mask); ClassDB::bind_method(_MD("set_mouse_mode","mode"),&Input::set_mouse_mode); ClassDB::bind_method(_MD("get_mouse_mode"),&Input::get_mouse_mode); diff --git a/core/os/input.h b/core/os/input.h index c365894f46..a1b60ba0c8 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -77,7 +77,7 @@ public: virtual void stop_joy_vibration(int p_device)=0; virtual Point2 get_mouse_pos() const=0; - virtual Point2 get_mouse_speed() const=0; + virtual Point2 get_last_mouse_speed() const=0; virtual int get_mouse_button_mask() const=0; virtual void warp_mouse_pos(const Vector2& p_to)=0; diff --git a/main/input_default.cpp b/main/input_default.cpp index 61a3a7da7e..a4023b23d2 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -465,7 +465,7 @@ Point2 InputDefault::get_mouse_pos() const { return mouse_pos; } -Point2 InputDefault::get_mouse_speed() const { +Point2 InputDefault::get_last_mouse_speed() const { return mouse_speed_track.speed; } diff --git a/main/input_default.h b/main/input_default.h index 33a852ab10..cab505644d 100644 --- a/main/input_default.h +++ b/main/input_default.h @@ -196,7 +196,7 @@ public: virtual Vector3 get_gyroscope() const; virtual Point2 get_mouse_pos() const; - virtual Point2 get_mouse_speed() const; + virtual Point2 get_last_mouse_speed() const; virtual int get_mouse_button_mask() const; virtual void warp_mouse_pos(const Vector2& p_to); diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index c9698a1a10..8a1385e113 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -1776,7 +1776,7 @@ void VisualScriptEditor::drop_data_fw(const Point2& p_point,const Variant& p_dat if (node) { graph->set_selected(node); _node_selected(node); - } + } } if (d.has("type") && String(d["type"])=="resource") { @@ -3082,7 +3082,7 @@ void VisualScriptEditor::_menu_option(int p_what) { //popup disappearing grabs focus to owner, so use call deferred node_filter->call_deferred("grab_focus"); node_filter->call_deferred("select_all"); - } break; + } break; case EDIT_COPY_NODES: case EDIT_CUT_NODES: { diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index 55fe3f21a0..3fcb6949ac 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -482,8 +482,8 @@ void OS_Android::process_touch(int p_what,int p_pointer, const Vector<TouchPos>& ev.mouse_motion.x=p_points[0].pos.x; ev.mouse_motion.y=p_points[0].pos.y; input->set_mouse_pos(Point2(ev.mouse_motion.x,ev.mouse_motion.y)); - ev.mouse_motion.speed_x=input->get_mouse_speed().x; - ev.mouse_motion.speed_y=input->get_mouse_speed().y; + ev.mouse_motion.speed_x=input->get_last_mouse_speed().x; + ev.mouse_motion.speed_y=input->get_last_mouse_speed().y; ev.mouse_motion.relative_x=p_points[0].pos.x-last_mouse.x; ev.mouse_motion.relative_y=p_points[0].pos.y-last_mouse.y; last_mouse=p_points[0].pos; diff --git a/platform/bb10/os_bb10.cpp b/platform/bb10/os_bb10.cpp index ed40355eb5..3913c31320 100644 --- a/platform/bb10/os_bb10.cpp +++ b/platform/bb10/os_bb10.cpp @@ -376,8 +376,8 @@ void OSBB10::handle_screen_event(bps_event_t *event) { ievent.mouse_motion.x = ievent.mouse_motion.global_x = mpos.x; ievent.mouse_motion.y = ievent.mouse_motion.global_y = mpos.y; input->set_mouse_pos(Point2(ievent.mouse_motion.x,ievent.mouse_motion.y)); - ievent.mouse_motion.speed_x=input->get_mouse_speed().x; - ievent.mouse_motion.speed_y=input->get_mouse_speed().y; + ievent.mouse_motion.speed_x=input->get_last_mouse_speed().x; + ievent.mouse_motion.speed_y=input->get_last_mouse_speed().y; ievent.mouse_motion.relative_x = mrel.x; ievent.mouse_motion.relative_y = mrel.y; ievent.mouse_motion.button_mask = 1; // pressed diff --git a/platform/haiku/haiku_direct_window.cpp b/platform/haiku/haiku_direct_window.cpp index 1def361367..2a8310b858 100644 --- a/platform/haiku/haiku_direct_window.cpp +++ b/platform/haiku/haiku_direct_window.cpp @@ -219,8 +219,8 @@ void HaikuDirectWindow::HandleMouseMoved(BMessage* message) { input->set_mouse_pos(pos); motion_event.mouse_motion.global_x = pos.x; motion_event.mouse_motion.global_y = pos.y; - motion_event.mouse_motion.speed_x = input->get_mouse_speed().x; - motion_event.mouse_motion.speed_y = input->get_mouse_speed().y; + motion_event.mouse_motion.speed_x = input->get_last_mouse_speed().x; + motion_event.mouse_motion.speed_y = input->get_last_mouse_speed().y; motion_event.mouse_motion.relative_x = rel.x; motion_event.mouse_motion.relative_y = rel.y; diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 47c8ea89d7..a6be77340f 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -644,8 +644,8 @@ void OS_JavaScript::process_touch(int p_what,int p_pointer, const Vector<TouchPo ev.mouse_motion.x=p_points[0].pos.x; ev.mouse_motion.y=p_points[0].pos.y; input->set_mouse_pos(Point2(ev.mouse_motion.x,ev.mouse_motion.y)); - ev.mouse_motion.speed_x=input->get_mouse_speed().x; - ev.mouse_motion.speed_y=input->get_mouse_speed().y; + ev.mouse_motion.speed_x=input->get_last_mouse_speed().x; + ev.mouse_motion.speed_y=input->get_last_mouse_speed().y; ev.mouse_motion.relative_x=p_points[0].pos.x-last_mouse.x; ev.mouse_motion.relative_y=p_points[0].pos.y-last_mouse.y; last_mouse=p_points[0].pos; diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 6256cb58e0..d88a545b5e 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -401,8 +401,8 @@ LRESULT OS_Windows::WndProc(HWND hWnd,UINT uMsg, WPARAM wParam, LPARAM lParam) { } input->set_mouse_pos(Point2(mm.x,mm.y)); - mm.speed_x=input->get_mouse_speed().x; - mm.speed_y=input->get_mouse_speed().y; + mm.speed_x=input->get_last_mouse_speed().x; + mm.speed_y=input->get_last_mouse_speed().y; if (old_invalid) { diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 9a4b19f2db..c1eb550949 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1467,8 +1467,8 @@ void OS_X11::process_xevents() { input->set_mouse_pos(pos); motion_event.mouse_motion.global_x=pos.x; motion_event.mouse_motion.global_y=pos.y; - motion_event.mouse_motion.speed_x=input->get_mouse_speed().x; - motion_event.mouse_motion.speed_y=input->get_mouse_speed().y; + motion_event.mouse_motion.speed_x=input->get_last_mouse_speed().x; + motion_event.mouse_motion.speed_y=input->get_last_mouse_speed().y; motion_event.mouse_motion.relative_x=rel.x; motion_event.mouse_motion.relative_y=rel.y; |