1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

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
This commit is contained in:
Alexander Holland
2019-11-15 00:34:50 +01:00
parent abefd42e84
commit b1b308411a
8 changed files with 160 additions and 1 deletions

View File

@@ -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);