mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-11-22 11:55:56 +00:00
Only present tab focus if it has actually changed.
This commit is contained in:
parent
75a65fa81c
commit
cf8ede147d
|
@ -153,7 +153,6 @@ func focus_tab_container():
|
||||||
func input_tab_container(event):
|
func input_tab_container(event):
|
||||||
if event.echo or not event.pressed:
|
if event.echo or not event.pressed:
|
||||||
return
|
return
|
||||||
tts.stop()
|
|
||||||
var new_tab = node.current_tab
|
var new_tab = node.current_tab
|
||||||
if event.scancode == KEY_RIGHT:
|
if event.scancode == KEY_RIGHT:
|
||||||
new_tab += 1
|
new_tab += 1
|
||||||
|
@ -163,7 +162,9 @@ func input_tab_container(event):
|
||||||
new_tab = node.get_tab_count() - 1
|
new_tab = node.get_tab_count() - 1
|
||||||
elif new_tab >= node.get_tab_count():
|
elif new_tab >= node.get_tab_count():
|
||||||
new_tab = 0
|
new_tab = 0
|
||||||
|
if node.current_tab != new_tab:
|
||||||
node.current_tab = new_tab
|
node.current_tab = new_tab
|
||||||
|
tts.stop()
|
||||||
focus_tab_container()
|
focus_tab_container()
|
||||||
|
|
||||||
func focus_tree():
|
func focus_tree():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user