mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Sync classref with current source
This commit is contained in:
@@ -50,7 +50,7 @@ Methods
|
||||
Enumerations
|
||||
------------
|
||||
|
||||
.. _enum_UndoRedo_MergeMode:
|
||||
.. _enum_UndoRedo_MergeMode:
|
||||
|
||||
enum **MergeMode**:
|
||||
|
||||
@@ -93,67 +93,67 @@ If you don't need to register a method you can leave :ref:`add_do_method<class_U
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
.. _class_UndoRedo_add_do_method:
|
||||
.. _class_UndoRedo_add_do_method:
|
||||
|
||||
- :ref:`Variant<class_Variant>` **add_do_method** **(** :ref:`Object<class_Object>` object, :ref:`String<class_String>` method **)** vararg
|
||||
|
||||
Register a method that will be called when the action is committed.
|
||||
|
||||
.. _class_UndoRedo_add_do_property:
|
||||
.. _class_UndoRedo_add_do_property:
|
||||
|
||||
- void **add_do_property** **(** :ref:`Object<class_Object>` object, :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
Register a property value change for 'do'.
|
||||
|
||||
.. _class_UndoRedo_add_do_reference:
|
||||
.. _class_UndoRedo_add_do_reference:
|
||||
|
||||
- void **add_do_reference** **(** :ref:`Object<class_Object>` object **)**
|
||||
|
||||
Register a reference for 'do' that will be erased if the 'do' history is lost. This is useful mostly for new nodes created for the 'do' call. Do not use for resources.
|
||||
|
||||
.. _class_UndoRedo_add_undo_method:
|
||||
.. _class_UndoRedo_add_undo_method:
|
||||
|
||||
- :ref:`Variant<class_Variant>` **add_undo_method** **(** :ref:`Object<class_Object>` object, :ref:`String<class_String>` method **)** vararg
|
||||
|
||||
Register a method that will be called when the action is undone.
|
||||
|
||||
.. _class_UndoRedo_add_undo_property:
|
||||
.. _class_UndoRedo_add_undo_property:
|
||||
|
||||
- void **add_undo_property** **(** :ref:`Object<class_Object>` object, :ref:`String<class_String>` property, :ref:`Variant<class_Variant>` value **)**
|
||||
|
||||
Register a property value change for 'undo'.
|
||||
|
||||
.. _class_UndoRedo_add_undo_reference:
|
||||
.. _class_UndoRedo_add_undo_reference:
|
||||
|
||||
- void **add_undo_reference** **(** :ref:`Object<class_Object>` object **)**
|
||||
|
||||
Register a reference for 'undo' that will be erased if the 'undo' history is lost. This is useful mostly for nodes removed with the 'do' call (not the 'undo' call!).
|
||||
|
||||
.. _class_UndoRedo_clear_history:
|
||||
.. _class_UndoRedo_clear_history:
|
||||
|
||||
- void **clear_history** **(** **)**
|
||||
|
||||
Clear the undo/redo history and associated references.
|
||||
|
||||
.. _class_UndoRedo_commit_action:
|
||||
.. _class_UndoRedo_commit_action:
|
||||
|
||||
- void **commit_action** **(** **)**
|
||||
|
||||
Commit the action. All 'do' methods/properties are called/set when this function is called.
|
||||
|
||||
.. _class_UndoRedo_create_action:
|
||||
.. _class_UndoRedo_create_action:
|
||||
|
||||
- void **create_action** **(** :ref:`String<class_String>` name, :ref:`MergeMode<enum_UndoRedo_MergeMode>` merge_mode=0 **)**
|
||||
|
||||
Create a new action. After this is called, do all your calls to :ref:`add_do_method<class_UndoRedo_add_do_method>`, :ref:`add_undo_method<class_UndoRedo_add_undo_method>`, :ref:`add_do_property<class_UndoRedo_add_do_property>`, and :ref:`add_undo_property<class_UndoRedo_add_undo_property>`, then commit the action with :ref:`commit_action<class_UndoRedo_commit_action>`.
|
||||
|
||||
.. _class_UndoRedo_get_current_action_name:
|
||||
.. _class_UndoRedo_get_current_action_name:
|
||||
|
||||
- :ref:`String<class_String>` **get_current_action_name** **(** **)** const
|
||||
|
||||
Get the name of the current action.
|
||||
|
||||
.. _class_UndoRedo_get_version:
|
||||
.. _class_UndoRedo_get_version:
|
||||
|
||||
- :ref:`int<class_int>` **get_version** **(** **)** const
|
||||
|
||||
@@ -161,13 +161,13 @@ Get the version, each time a new action is committed, the version number of the
|
||||
|
||||
This is useful mostly to check if something changed from a saved version.
|
||||
|
||||
.. _class_UndoRedo_redo:
|
||||
.. _class_UndoRedo_redo:
|
||||
|
||||
- :ref:`bool<class_bool>` **redo** **(** **)**
|
||||
|
||||
Redo last action.
|
||||
|
||||
.. _class_UndoRedo_undo:
|
||||
.. _class_UndoRedo_undo:
|
||||
|
||||
- :ref:`bool<class_bool>` **undo** **(** **)**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user