mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-11-24 21:05:57 +00:00
Stop TTS on button presses.
This commit is contained in:
parent
54c01c5381
commit
6ecd8fa32e
|
@ -69,6 +69,10 @@ func _accept_dialog_about_to_show():
|
||||||
ScreenReader.should_stop_on_focus = false
|
ScreenReader.should_stop_on_focus = false
|
||||||
|
|
||||||
|
|
||||||
|
func _basebutton_pressed():
|
||||||
|
TTS.stop()
|
||||||
|
|
||||||
|
|
||||||
func checkbox_focused():
|
func checkbox_focused():
|
||||||
var tokens = PoolStringArray([])
|
var tokens = PoolStringArray([])
|
||||||
if node.text:
|
if node.text:
|
||||||
|
@ -707,6 +711,8 @@ func _init(node):
|
||||||
node.connect("focus_exited", self, "unfocused")
|
node.connect("focus_exited", self, "unfocused")
|
||||||
node.connect("mouse_exited", self, "unfocused")
|
node.connect("mouse_exited", self, "unfocused")
|
||||||
node.connect("gui_input", self, "gui_input")
|
node.connect("gui_input", self, "gui_input")
|
||||||
|
if node is BaseButton:
|
||||||
|
node.connect("pressed", self, "_basebutton_pressed")
|
||||||
if node is AcceptDialog:
|
if node is AcceptDialog:
|
||||||
node.connect("about_to_show", self, "_accept_dialog_about_to_show")
|
node.connect("about_to_show", self, "_accept_dialog_about_to_show")
|
||||||
elif node is CheckBox or node is CheckButton:
|
elif node is CheckBox or node is CheckButton:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user