File tree Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Expand file tree Collapse file tree 4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ func _dim_checker() -> void:
273273
274274
275275func _get_drag_data (_position : Vector2 ) -> Variant :
276- if DisplayServer .is_touchscreen_available ():
276+ if DisplayServer .is_touchscreen_available () and not button_pressed :
277277 return null
278278 var button := Button .new ()
279279 button .size = size
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ func _on_PopupMenu_id_pressed(id: int) -> void:
110110
111111
112112func _get_drag_data (_position : Vector2 ) -> Variant :
113- if DisplayServer .is_touchscreen_available ():
113+ if DisplayServer .is_touchscreen_available () and not button_pressed :
114114 return null
115115 var button := Button .new ()
116116 button .size = size
Original file line number Diff line number Diff line change @@ -120,18 +120,23 @@ func _gui_input(event: InputEvent) -> void:
120120 ):
121121 h_scroll_bar .value -= PAGE_DIVISOR * event .factor
122122 accept_event ()
123- elif (
123+ return
124+ if (
124125 event .button_index == MOUSE_BUTTON_WHEEL_DOWN
125126 or event .button_index == MOUSE_BUTTON_WHEEL_RIGHT
126127 ):
127128 h_scroll_bar .value += PAGE_DIVISOR * event .factor
128129 accept_event ()
130+ return
129131 _touchscreen_scroll (event )
130132
131133
132134func _touchscreen_scroll (event : InputEvent ) -> void :
133135 if not DisplayServer .is_touchscreen_available ():
134136 return
137+ if get_viewport ().gui_is_dragging () and not scroll_on_drag_hover :
138+ _cancel_drag ()
139+ return
135140 var prev_h_scroll := h_scroll_bar .value
136141 # Handle mouse button input
137142 if event is InputEventMouseButton :
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ func _ready() -> void:
1212
1313
1414func _get_drag_data (_position : Vector2 ) -> Variant :
15- if DisplayServer .is_touchscreen_available ():
15+ if DisplayServer .is_touchscreen_available () and not button_pressed :
1616 return null
1717 var layers := _get_layer_indices ()
1818 for layer_i in layers : # Add child layers, if we have selected groups
You can’t perform that action at this time.
0 commit comments