diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-03-24 22:53:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-24 22:53:27 +0100 |
commit | 4911555f6c59a366b214261fadeb0fcbaed8fbac (patch) | |
tree | 49f6890b1e35fa230ca2bb45bbfcd4ec6ca63ee1 /main | |
parent | 5cad9147f9b1f96ba0fdc84f0a6112befdfdfc92 (diff) | |
parent | 468719c480100a0d5c8e5c5760f7f38f6a857d4a (diff) |
Merge pull request #8137 from Hinsbart/mbutton_pos
Input: Update mouse position on mouse-button events.
Diffstat (limited to 'main')
-rw-r--r-- | main/input_default.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp index 8e352ca8e3..125bd8c8d7 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -336,6 +336,11 @@ void InputDefault::parse_input_event(const InputEvent &p_event) { ev.screen_touch = touch_event; main_loop->input_event(ev); } + + Point2 pos = Point2(p_event.mouse_button.global_x, p_event.mouse_button.global_y); + if (mouse_pos != pos) { + set_mouse_pos(pos); + } } break; case InputEvent::MOUSE_MOTION: { |