mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-11-22 11:55:56 +00:00
Handle arrow events in ItemList so other controls aren't activated.
This commit is contained in:
parent
34e9799613
commit
77d3ff7e44
|
@ -40,10 +40,12 @@ func input_item_list(event):
|
||||||
if event.echo or not event.pressed:
|
if event.echo or not event.pressed:
|
||||||
return
|
return
|
||||||
if event.scancode == KEY_UP:
|
if event.scancode == KEY_UP:
|
||||||
|
node.get_tree().set_input_as_handled()
|
||||||
if list_pos == 0:
|
if list_pos == 0:
|
||||||
return
|
return
|
||||||
list_pos -= 1
|
list_pos -= 1
|
||||||
elif event.scancode == KEY_DOWN:
|
elif event.scancode == KEY_DOWN:
|
||||||
|
node.get_tree().set_input_as_handled()
|
||||||
if list_pos >= node.get_item_count()-1:
|
if list_pos >= node.get_item_count()-1:
|
||||||
return
|
return
|
||||||
list_pos += 1
|
list_pos += 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user