diff options
| author | Juan Linietsky <reduzio@gmail.com> | 2015-08-02 12:29:37 -0300 |
|---|---|---|
| committer | Juan Linietsky <reduzio@gmail.com> | 2015-08-02 12:30:01 -0300 |
| commit | 59961c99144523d7cc2881a4abe6d0a319a975df (patch) | |
| tree | 556cd9053433a27bbbc34dfe0a3e9fe693957299 /core/undo_redo.h | |
| parent | 922356b903061cda7591090bf19e8346c3a78cf5 (diff) | |
| download | redot-engine-59961c99144523d7cc2881a4abe6d0a319a975df.tar.gz | |
Live edit WORK IN PROGRESS
1) press the heart while the game is running
2) select a scene to live edit from the opened scenes
3) edit/add/remove nodes or resources, change their properties, etc.
4) watch changes reflected in running game, in all places this scene is
edited
5) It's not perfect obviously, but the aim of it is to try to reflect
your changes as best as possible in the running game.
Diffstat (limited to 'core/undo_redo.h')
| -rw-r--r-- | core/undo_redo.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/undo_redo.h b/core/undo_redo.h index a9187534c1..141a413c2a 100644 --- a/core/undo_redo.h +++ b/core/undo_redo.h @@ -45,6 +45,9 @@ public: Variant _add_do_method(const Variant** p_args, int p_argcount, Variant::CallError& r_error); Variant _add_undo_method(const Variant** p_args, int p_argcount, Variant::CallError& r_error); + typedef void (*MethodNotifyCallback)(void *p_ud,Object*p_base,const StringName& p_name,VARIANT_ARG_DECLARE); + typedef void (*PropertyNotifyCallback)(void *p_ud,Object*p_base,const StringName& p_property,const Variant& p_value); + private: struct Operation { @@ -83,6 +86,11 @@ private: CommitNotifyCallback callback; void* callback_ud; + void* method_callbck_ud; + void* prop_callback_ud; + + MethodNotifyCallback method_callback; + PropertyNotifyCallback property_callback; protected: @@ -113,6 +121,9 @@ public: void set_commit_notify_callback(CommitNotifyCallback p_callback,void* p_ud); + void set_method_notify_callback(MethodNotifyCallback p_method_callback,void* p_ud); + void set_property_notify_callback(PropertyNotifyCallback p_property_callback,void* p_ud); + UndoRedo(); ~UndoRedo(); }; |
