Don't guess the label for a label.

This commit is contained in:
Nolan Darilek 2019-12-30 09:13:32 -06:00
parent 5b2c16f342
commit d5c79f7c56

View File

@ -450,12 +450,13 @@ func tab_container_input(event):
func focused(): func focused():
print_debug("Focus: %s" % node) print_debug("Focus: %s" % node)
TTS.stop() TTS.stop()
var label = guess_label() if not node is Label:
if label: var label = guess_label()
if label is Label: if label:
label = label.text if label is Label:
if label and label != "": label = label.text
TTS.speak(label, false) if label and label != "":
TTS.speak(label, false)
if node is MenuButton: if node is MenuButton:
menu_button_focused() menu_button_focused()
elif node is AcceptDialog: elif node is AcceptDialog: