godot
godot copied to clipboard
Add `autofocus` property to Control
trafficstars
- Adding
autofocusproperty. The control will attempt to automatically grab focus when it becomes visible. If multiple controls enableautofocusproperty, the last control to become visible will grab focus. - Adding documentation to
autofocusproperty.
Fix https://github.com/godotengine/godot-proposals/issues/6298
To test the behavior, you can use the attached project (autofocus is enabled on two buttons, the last one gets focus when the game starts).