aboutsummaryrefslogtreecommitdiff
path: root/touch_item_list
diff options
context:
space:
mode:
Diffstat (limited to 'touch_item_list')
-rw-r--r--touch_item_list/touch_item_list.gd3
1 files changed, 2 insertions, 1 deletions
diff --git a/touch_item_list/touch_item_list.gd b/touch_item_list/touch_item_list.gd
index 07d8f30..2b18eae 100644
--- a/touch_item_list/touch_item_list.gd
+++ b/touch_item_list/touch_item_list.gd
@@ -2,6 +2,7 @@ extends ItemList
class_name TouchItemList
const POINTER_VELOCITY_DECAYING_FACTOR: float = 2.5
+const EXACT_SELECTION: bool = false
var is_pointer_dragging := false
var pointer_drag_velocity := 0.0
@@ -41,7 +42,7 @@ func pointer_input_on_end_drag_handler(pointer: PointerInputSensor.PointerInputD
func pointer_input_on_click_handler(pointer: PointerInputSensor.PointerInputData):
- var selected_idx := get_item_at_position(pointer.current_position - rect_global_position, true)
+ var selected_idx := get_item_at_position(pointer.current_position - rect_global_position, EXACT_SELECTION)
if selected_idx >= 0:
select(selected_idx)
emit_signal("item_selected", selected_idx)