Merge pull request #66559 from zaevi/fix_ScrollContainer_touch_scroll
Fix ScrollContainer touch-scrolling not working.
This commit is contained in:
commit
02e9e2d3c0
2 changed files with 2 additions and 2 deletions
|
@ -565,7 +565,7 @@ bool DisplayServerWindows::screen_is_touchscreen(int p_screen) const {
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
#warning touchscreen not working
|
#warning touchscreen not working
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return DisplayServer::screen_is_touchscreen(p_screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayServerWindows::screen_set_orientation(ScreenOrientation p_orientation, int p_screen) {
|
void DisplayServerWindows::screen_set_orientation(ScreenOrientation p_orientation, int p_screen) {
|
||||||
|
|
|
@ -162,7 +162,7 @@ void ScrollContainer::gui_input(const Ref<InputEvent> &p_gui_input) {
|
||||||
drag_accum = Vector2();
|
drag_accum = Vector2();
|
||||||
last_drag_accum = Vector2();
|
last_drag_accum = Vector2();
|
||||||
drag_from = Vector2(h_scroll->get_value(), v_scroll->get_value());
|
drag_from = Vector2(h_scroll->get_value(), v_scroll->get_value());
|
||||||
drag_touching = !DisplayServer::get_singleton()->screen_is_touchscreen(DisplayServer::get_singleton()->window_get_current_screen(get_viewport()->get_window_id()));
|
drag_touching = DisplayServer::get_singleton()->screen_is_touchscreen(DisplayServer::get_singleton()->window_get_current_screen(get_viewport()->get_window_id()));
|
||||||
drag_touching_deaccel = false;
|
drag_touching_deaccel = false;
|
||||||
beyond_deadzone = false;
|
beyond_deadzone = false;
|
||||||
time_since_motion = 0;
|
time_since_motion = 0;
|
||||||
|
|
Loading…
Reference in a new issue