mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-11-22 11:55:56 +00:00
Add presentation for buttons.
This commit is contained in:
parent
84df5394cc
commit
417a865bdb
|
@ -15,7 +15,6 @@ func augment_tree(node):
|
||||||
func set_initial_screen_focus(screen):
|
func set_initial_screen_focus(screen):
|
||||||
self.augment_tree(get_tree().root)
|
self.augment_tree(get_tree().root)
|
||||||
var focus = find_focusable_control(get_tree().root)
|
var focus = find_focusable_control(get_tree().root)
|
||||||
print("Focus ",focus, focus.is_in_group("accessible"))
|
|
||||||
if not focus:
|
if not focus:
|
||||||
return
|
return
|
||||||
focus.grab_click_focus()
|
focus.grab_click_focus()
|
||||||
|
|
|
@ -3,6 +3,12 @@ extends Object
|
||||||
var node
|
var node
|
||||||
|
|
||||||
func focused():
|
func focused():
|
||||||
|
if node is Button:
|
||||||
|
var text = "Unlabelled"
|
||||||
|
if node.text:
|
||||||
|
text = node.text
|
||||||
|
print("%s: button" % text)
|
||||||
|
else:
|
||||||
print("Focus entered.", self.node)
|
print("Focus entered.", self.node)
|
||||||
|
|
||||||
func unfocused():
|
func unfocused():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user