mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-11-22 03:45:56 +00:00
Add support for speaking collapsed/expanded status of EditorInspectorSection
.
This commit is contained in:
parent
2ee04f5978
commit
355b25b10a
|
@ -361,12 +361,23 @@ func is_focusable(node):
|
||||||
return true
|
return true
|
||||||
|
|
||||||
func editor_inspector_section_focus():
|
func editor_inspector_section_focus():
|
||||||
print(node.get_child_count())
|
var child = node.get_children()[0]
|
||||||
tts.speak("editor inspector section", true)
|
var expanded = child.is_visible_in_tree()
|
||||||
|
tts.speak("editor inspector section:", true)
|
||||||
|
if expanded:
|
||||||
|
tts.speak("expanded", false)
|
||||||
|
else:
|
||||||
|
tts.speak("collapsed", false)
|
||||||
|
|
||||||
func editor_inspector_section_input(event):
|
func editor_inspector_section_input(event):
|
||||||
if event.is_action_pressed("ui_accept"):
|
if event.is_action_pressed("ui_accept"):
|
||||||
left_click()
|
left_click()
|
||||||
|
var child = node.get_children()[0]
|
||||||
|
var expanded = child.is_visible_in_tree()
|
||||||
|
if expanded:
|
||||||
|
tts.speak("expanded", true)
|
||||||
|
else:
|
||||||
|
tts.speak("collapsed", true)
|
||||||
|
|
||||||
func _init(tts, node):
|
func _init(tts, node):
|
||||||
if node.is_in_group("accessible"):
|
if node.is_in_group("accessible"):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user