mirror of
https://github.com/lightsoutgames/godot-accessibility.git
synced 2024-11-09 15:35:55 +00:00
Remove code that no longer seems necessary for restoring focus in the editor when lost.
This commit is contained in:
parent
d7b4744c6a
commit
3a160df5fd
|
@ -572,20 +572,15 @@ func focused():
|
||||||
spoke_hint_tooltip = false
|
spoke_hint_tooltip = false
|
||||||
|
|
||||||
|
|
||||||
var timer
|
|
||||||
|
|
||||||
|
|
||||||
func unfocused():
|
func unfocused():
|
||||||
print_debug("Unfocused")
|
print_debug("Unfocused")
|
||||||
position_in_children = 0
|
position_in_children = 0
|
||||||
timer = node.get_tree().create_timer(1)
|
|
||||||
|
|
||||||
|
|
||||||
func click_focused():
|
func click_focused():
|
||||||
if node.has_focus():
|
if node.has_focus():
|
||||||
return
|
return
|
||||||
if node.focus_mode == Control.FOCUS_ALL:
|
if node.focus_mode == Control.FOCUS_ALL:
|
||||||
print_debug("Grabbing focus: %s" % node)
|
|
||||||
node.grab_focus()
|
node.grab_focus()
|
||||||
|
|
||||||
|
|
||||||
|
@ -733,17 +728,3 @@ func _init(node):
|
||||||
else:
|
else:
|
||||||
node.connect("item_selected", self, "tree_item_selected")
|
node.connect("item_selected", self, "tree_item_selected")
|
||||||
node.connect("tree_exiting", self, "queue_free", [], Object.CONNECT_DEFERRED)
|
node.connect("tree_exiting", self, "queue_free", [], Object.CONNECT_DEFERRED)
|
||||||
|
|
||||||
|
|
||||||
func _process(delta):
|
|
||||||
if timer and timer.time_left <= 0:
|
|
||||||
if node.is_inside_tree() and not node.get_focus_owner():
|
|
||||||
node.get_tree().root.warp_mouse(node.rect_global_position)
|
|
||||||
timer = null
|
|
||||||
|
|
||||||
|
|
||||||
func free():
|
|
||||||
if timer:
|
|
||||||
timer.unreference()
|
|
||||||
timer = null
|
|
||||||
.free()
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user