mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-11-22 11:55:56 +00:00
Use text_inserted and text_deleted signals.
This commit is contained in:
parent
9899940106
commit
9b3c1e6f38
|
@ -33,6 +33,12 @@ func present_line_edit():
|
||||||
type = "text"
|
type = "text"
|
||||||
print("%s: %s" % [text, type])
|
print("%s: %s" % [text, type])
|
||||||
|
|
||||||
|
func text_deleted(text):
|
||||||
|
print("%s deleted" % text)
|
||||||
|
|
||||||
|
func text_inserted(text):
|
||||||
|
print(text)
|
||||||
|
|
||||||
var old_pos
|
var old_pos
|
||||||
|
|
||||||
func check_caret_moved():
|
func check_caret_moved():
|
||||||
|
@ -80,4 +86,7 @@ func _init(node):
|
||||||
self.node.connect("focus_exited", self, "unfocused")
|
self.node.connect("focus_exited", self, "unfocused")
|
||||||
self.node.connect("mouse_exited", self, "unfocused")
|
self.node.connect("mouse_exited", self, "unfocused")
|
||||||
self.node.connect("gui_input", self, "gui_input")
|
self.node.connect("gui_input", self, "gui_input")
|
||||||
|
if self.node is LineEdit:
|
||||||
|
self.node.connect("text_deleted", self, "text_deleted")
|
||||||
|
self.node.connect("text_inserted", self, "text_inserted")
|
||||||
self.node.connect("tree_exiting", self, "free")
|
self.node.connect("tree_exiting", self, "free")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user