Mention that grab_focus is more reliable deferred
This commit is contained in:
parent
0bf3f79157
commit
188d5593e1
2 changed files with 5 additions and 0 deletions
|
@ -75,6 +75,10 @@
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<description>
|
<description>
|
||||||
Calls the method represented by this [Callable] in deferred mode, i.e. during the idle frame. Arguments can be passed and should match the method's signature.
|
Calls the method represented by this [Callable] in deferred mode, i.e. during the idle frame. Arguments can be passed and should match the method's signature.
|
||||||
|
[codeblock]
|
||||||
|
func _ready():
|
||||||
|
grab_focus.call_deferred()
|
||||||
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_method" qualifiers="const">
|
<method name="get_method" qualifiers="const">
|
||||||
|
|
|
@ -553,6 +553,7 @@
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<description>
|
<description>
|
||||||
Steal the focus from another control and become the focused control (see [member focus_mode]).
|
Steal the focus from another control and become the focused control (see [member focus_mode]).
|
||||||
|
[b]Note[/b]: Using this method together with [method Callable.call_deferred] makes it more reliable, especially when called inside [method Node._ready].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="has_focus" qualifiers="const">
|
<method name="has_focus" qualifiers="const">
|
||||||
|
|
Loading…
Reference in a new issue