Make guessed labels non-focusable to minimize on tabbing.

This commit is contained in:
Nolan Darilek 2019-12-30 09:16:00 -06:00
parent d5c79f7c56
commit 2aea81749c

View File

@ -599,6 +599,9 @@ func _init(node):
self.node = node self.node = node
if is_focusable(node): if is_focusable(node):
node.set_focus_mode(Control.FOCUS_ALL) node.set_focus_mode(Control.FOCUS_ALL)
var label = guess_label()
if label and label is Label:
label.set_focus_mode(Control.FOCUS_NONE)
node.connect("focus_entered", self, "focused") node.connect("focus_entered", self, "focused")
node.connect("mouse_entered", self, "click_focused") node.connect("mouse_entered", self, "click_focused")
node.connect("focus_exited", self, "unfocused") node.connect("focus_exited", self, "unfocused")