mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-12-22 07:35:56 +00:00
Basic presentation for LineEdit.
This commit is contained in:
parent
417a865bdb
commit
1ef8886876
|
@ -2,12 +2,30 @@ extends Object
|
|||
|
||||
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():
|
||||
if node is Button:
|
||||
var text = "Unlabelled"
|
||||
if node.text:
|
||||
text = node.text
|
||||
print("%s: button" % text)
|
||||
present_button()
|
||||
elif node is LineEdit:
|
||||
present_line_edit()
|
||||
else:
|
||||
print("Focus entered.", self.node)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user