mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
classref: Fix links case and sync headers with editor
Output from godotengine/godot#22002.
This commit is contained in:
@@ -7,8 +7,7 @@
|
||||
FuncRef
|
||||
=======
|
||||
|
||||
**Inherits:** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
|
||||
|
||||
**Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
||||
**Category:** Core
|
||||
|
||||
Brief Description
|
||||
@@ -16,15 +15,15 @@ Brief Description
|
||||
|
||||
Reference to a function in an object.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
Methods
|
||||
-------
|
||||
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Variant<class_variant>` | :ref:`call_func<class_FuncRef_call_func>` **(** **)** vararg |
|
||||
| :ref:`Variant<class_Variant>` | :ref:`call_func<class_FuncRef_call_func>` **(** **)** vararg |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_function<class_FuncRef_set_function>` **(** :ref:`String<class_string>` name **)** |
|
||||
| void | :ref:`set_function<class_FuncRef_set_function>` **(** :ref:`String<class_String>` name **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_instance<class_FuncRef_set_instance>` **(** :ref:`Object<class_object>` instance **)** |
|
||||
| void | :ref:`set_instance<class_FuncRef_set_instance>` **(** :ref:`Object<class_Object>` instance **)** |
|
||||
+--------------------------------+--------------------------------------------------------------------------------------------------+
|
||||
|
||||
Description
|
||||
@@ -34,25 +33,25 @@ In GDScript, functions are not *first-class objects*. This means it is impossibl
|
||||
|
||||
However, by creating a ``FuncRef`` using the :ref:`@GDScript.funcref<class_@GDScript_funcref>` function, a reference to a function in a given object can be created, passed around and called.
|
||||
|
||||
Member Function Description
|
||||
---------------------------
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
.. _class_FuncRef_call_func:
|
||||
|
||||
- :ref:`Variant<class_variant>` **call_func** **(** **)** vararg
|
||||
- :ref:`Variant<class_Variant>` **call_func** **(** **)** vararg
|
||||
|
||||
Calls the referenced function previously set by :ref:`set_function<class_FuncRef_set_function>` or :ref:`@GDScript.funcref<class_@GDScript_funcref>`.
|
||||
|
||||
.. _class_FuncRef_set_function:
|
||||
|
||||
- void **set_function** **(** :ref:`String<class_string>` name **)**
|
||||
- void **set_function** **(** :ref:`String<class_String>` name **)**
|
||||
|
||||
The name of the referenced function to call on the object, without parentheses or any parameters.
|
||||
|
||||
.. _class_FuncRef_set_instance:
|
||||
|
||||
- void **set_instance** **(** :ref:`Object<class_object>` instance **)**
|
||||
- void **set_instance** **(** :ref:`Object<class_Object>` instance **)**
|
||||
|
||||
The object containing the referenced function. This object must be of a type actually inheriting from :ref:`Object<class_object>`, not a built-in type such as :ref:`int<class_int>`, :ref:`Vector2<class_vector2>` or :ref:`Dictionary<class_dictionary>`.
|
||||
The object containing the referenced function. This object must be of a type actually inheriting from :ref:`Object<class_Object>`, not a built-in type such as :ref:`int<class_int>`, :ref:`Vector2<class_Vector2>` or :ref:`Dictionary<class_Dictionary>`.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user