mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-11-22 11:55:56 +00:00
Basic presentation for LineEdit.
This commit is contained in:
parent
417a865bdb
commit
1ef8886876
|
@ -2,12 +2,30 @@ extends Object
|
||||||
|
|
||||||
var node
|
var node
|
||||||
|
|
||||||
|
func present_button():
|
||||||
|
var text = "Unlabelled"
|
||||||
|
if node.text:
|
||||||
|
text = node.text
|
||||||
|
print("%s: button" % text)
|
||||||
|
|
||||||
|
func present_line_edit():
|
||||||
|
var text = "blank"
|
||||||
|
if node.secret:
|
||||||
|
text = "password"
|
||||||
|
elif node.text != "":
|
||||||
|
text = node.text
|
||||||
|
elif node.placeholder_text != "":
|
||||||
|
text = node.placeholder_text
|
||||||
|
var type = "editable text"
|
||||||
|
if not node.editable:
|
||||||
|
type = "text"
|
||||||
|
print("%s: %s" % [text, type])
|
||||||
|
|
||||||
func focused():
|
func focused():
|
||||||
if node is Button:
|
if node is Button:
|
||||||
var text = "Unlabelled"
|
present_button()
|
||||||
if node.text:
|
elif node is LineEdit:
|
||||||
text = node.text
|
present_line_edit()
|
||||||
print("%s: button" % text)
|
|
||||||
else:
|
else:
|
||||||
print("Focus entered.", self.node)
|
print("Focus entered.", self.node)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user