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:
Nolan Darilek 2018-06-12 12:32:09 +00:00
parent 70f8e1c98d
commit 6d1d0f914e

View File

@ -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")