From 9e96569d70660cb18b2d4669e6a71efcb4f863d6 Mon Sep 17 00:00:00 2001 From: dam Date: Sun, 6 Feb 2022 03:19:37 +0000 Subject: WIP: Implement option sets logic. --- touch_item_list/touch_item_list.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'touch_item_list') 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) -- cgit v1.2.3