Button set focus

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jlopezcur
:warning: Old Version Published before Godot 3 was released.

How to set focus on one button by code?

:bust_in_silhouette: Reply From: jlopezcur

I found the answer! (All day searching and was so simple)

get_node("Button").grab_focus()

I put it here for anyone searching the same :slight_smile:

thank you so much!! :smiley: <3

Moizez102 | 2018-12-11 19:44

thank you :slight_smile: !

ruruarchy | 2019-06-24 06:27

Remember to disable toggle mode on the button, I learned the hard way lol.

Icewheel12 | 2023-01-08 18:10