Fix main menu focus
This commit is contained in:
1 parent
27d056fafa
commit
bfd455341d
3 files changed
+7
-2
No files matched your search
@@ -52,6 +52,8 @@ func onTabChanged(tabIndex:int) -> void:
|
||||
_focusFirstIn(tabControls[tabIndex])
|
||||
|
||||
func _focusFirstIn(container:Control) -> void:
|
||||
if !is_visible_in_tree():
|
||||
return
|
||||
for child in container.get_children():
|
||||
if child is Control and child.focus_mode != Control.FOCUS_NONE:
|
||||
child.grab_focus()
|
||||
|
||||
Reference in new issue
Block a user