mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-12-22 07:35:56 +00:00
Add presentation of text when arrowing left/right in LineEdit.
Note that this addon now requires changes not available in any current Godot release.
This commit is contained in:
parent
70f8e1c98d
commit
6d1d0f914e
|
@ -33,6 +33,13 @@ func present_line_edit():
|
|||
type = "text"
|
||||
print("%s: %s" % [text, type])
|
||||
|
||||
func caret_moved():
|
||||
var pos = node.caret_position
|
||||
var text = node.text
|
||||
if pos > len(text)-1:
|
||||
return
|
||||
print(text[pos])
|
||||
|
||||
func present_tree():
|
||||
var root = node.get_root()
|
||||
var count = 0
|
||||
|
@ -67,4 +74,6 @@ func _init(node):
|
|||
self.node.connect("focus_exited", self, "unfocused")
|
||||
self.node.connect("mouse_exited", self, "unfocused")
|
||||
self.node.connect("gui_input", self, "gui_input")
|
||||
if self.node is LineEdit:
|
||||
self.node.connect("caret_moved", self, "caret_moved")
|
||||
self.node.connect("tree_exiting", self, "free")
|
||||
|
|
Loading…
Reference in New Issue
Block a user