From b1b308411a8e6ac6d65f25b9e5d6479af2a795c7 Mon Sep 17 00:00:00 2001 From: Alexander Holland Date: Fri, 15 Nov 2019 00:34:50 +0100 Subject: Fixes Android FileDialog - Go up was not working, simplify was used one time too much - Added GestureHandler - Added doubleTap to recognize open dir - Fixed scroll where sometimes the scroll jumped between start and end when pointer was outside or on the edge of the scroll area --- platform/android/os_android.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'platform/android/os_android.cpp') 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 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 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); -- cgit v1.2.3