diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-10 15:46:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-10 15:46:20 +0100 |
commit | 60289beeccd1ac7cc757b163199795ddac7530a9 (patch) | |
tree | 36c2cb830029508f1a044889cdab7574a4a2fca8 /platform/android/os_android.cpp | |
parent | 840c60a1eaaa210accd0ed44383942f525920cca (diff) | |
parent | b1b308411a8e6ac6d65f25b9e5d6479af2a795c7 (diff) |
Merge pull request #33630 from AlexHolly/android-doubleTap
Fixes Android FileDialog
Diffstat (limited to 'platform/android/os_android.cpp')
-rw-r--r-- | platform/android/os_android.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index 4c560273e8..bbea5e3699 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -502,6 +502,26 @@ void OS_Android::process_hover(int p_type, Point2 p_pos) { } } +void OS_Android::process_double_tap(Point2 p_pos) { + Ref<InputEventMouseButton> ev; + ev.instance(); + ev->set_position(p_pos); + ev->set_global_position(p_pos); + ev->set_pressed(true); + ev->set_doubleclick(true); + ev->set_button_index(1); + input->parse_input_event(ev); +} + +void OS_Android::process_scroll(Point2 p_pos) { + Ref<InputEventPanGesture> ev; + ev.instance(); + ev->set_position(p_pos); + ev->set_delta(p_pos - scroll_prev_pos); + input->parse_input_event(ev); + scroll_prev_pos = p_pos; +} + void OS_Android::process_accelerometer(const Vector3 &p_accelerometer) { input->set_accelerometer(p_accelerometer); |