From 417a865bdbacc820f2b6d40ce17c13ca9c664c3f Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Sun, 10 Jun 2018 20:18:00 +0000 Subject: [PATCH] Add presentation for buttons. --- addons/accessibility/accessibility.gd | 1 - addons/accessibility/accessible.gd | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/accessibility/accessibility.gd b/addons/accessibility/accessibility.gd index b889603..55f5607 100644 --- a/addons/accessibility/accessibility.gd +++ b/addons/accessibility/accessibility.gd @@ -15,7 +15,6 @@ func augment_tree(node): func set_initial_screen_focus(screen): self.augment_tree(get_tree().root) var focus = find_focusable_control(get_tree().root) - print("Focus ",focus, focus.is_in_group("accessible")) if not focus: return focus.grab_click_focus() diff --git a/addons/accessibility/accessible.gd b/addons/accessibility/accessible.gd index c6ae8bc..d0e888f 100644 --- a/addons/accessibility/accessible.gd +++ b/addons/accessibility/accessible.gd @@ -3,7 +3,13 @@ extends Object var node func focused(): - print("Focus entered.", self.node) + if node is Button: + var text = "Unlabelled" + if node.text: + text = node.text + print("%s: button" % text) + else: + print("Focus entered.", self.node) func unfocused(): pass