aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/script_editor_debugger.h
diff options
context:
space:
mode:
authorJuan Linietsky2015-08-02 12:29:37 -0300
committerJuan Linietsky2015-08-02 12:30:01 -0300
commit59961c99144523d7cc2881a4abe6d0a319a975df (patch)
tree556cd9053433a27bbbc34dfe0a3e9fe693957299 /tools/editor/script_editor_debugger.h
parent922356b903061cda7591090bf19e8346c3a78cf5 (diff)
downloadgodot-59961c99144523d7cc2881a4abe6d0a319a975df.tar.gz
godot-59961c99144523d7cc2881a4abe6d0a319a975df.tar.zst
godot-59961c99144523d7cc2881a4abe6d0a319a975df.zip
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 '')
-rw-r--r--tools/editor/script_editor_debugger.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/editor/script_editor_debugger.h b/tools/editor/script_editor_debugger.h
index c59cc1cf9..e8ac0fddb 100644
--- a/tools/editor/script_editor_debugger.h
+++ b/tools/editor/script_editor_debugger.h
@@ -56,9 +56,13 @@ class ScriptEditorDebugger : public Control {
LineEdit *clicked_ctrl;
LineEdit *clicked_ctrl_type;
+ LineEdit *live_edit_root;
Tree *scene_tree;
HSplitContainer *info;
Button *scene_tree_refresh;
+ Button *le_set;
+ Button *le_clear;
+
TextureButton *tb;
@@ -94,11 +98,17 @@ class ScriptEditorDebugger : public Control {
Array message;
int pending_in_queue;
+ HashMap<NodePath,int> node_path_cache;
+ int last_path_id;
+ Map<String,int> res_path_cache;
+
EditorNode *editor;
bool breaked;
+ bool live_debug;
+
void _performance_draw();
void _performance_select(Object *, int, bool);
void _stack_dump_frame_selected();
@@ -108,6 +118,20 @@ class ScriptEditorDebugger : public Control {
void _scene_tree_request();
void _parse_message(const String& p_msg,const Array& p_data);
+
+ int _get_node_path_cache(const NodePath& p_path);
+
+ int _get_res_path_cache(const String& p_path);
+
+ void _live_edit_set();
+ void _live_edit_clear();
+
+ void _method_changed(Object*p_base,const StringName& p_name,VARIANT_ARG_DECLARE);
+ void _property_changed(Object*p_base,const StringName& p_property,const Variant& p_value);
+
+ static void _method_changeds(void *p_ud,Object*p_base,const StringName& p_name,VARIANT_ARG_DECLARE);
+ static void _property_changeds(void *p_ud,Object*p_base,const StringName& p_property,const Variant& p_value);
+
protected:
void _notification(int p_what);
@@ -127,6 +151,19 @@ public:
String get_var_value(const String& p_var) const;
+ void set_live_debugging(bool p_enable);
+
+ void live_debug_create_node(const NodePath& p_parent,const String& p_type,const String& p_name);
+ void live_debug_instance_node(const NodePath& p_parent,const String& p_path,const String& p_name);
+ void live_debug_remove_node(const NodePath& p_at);
+ void live_debug_remove_and_keep_node(const NodePath& p_at,ObjectID p_keep_id);
+ void live_debug_restore_node(ObjectID p_id,const NodePath& p_at,int p_at_pos);
+ void live_debug_duplicate_node(const NodePath& p_at,const String& p_new_name);
+ void live_debug_reparent_node(const NodePath& p_at,const NodePath& p_new_place,const String& p_new_name);
+
+ void update_live_edit_root();
+
+
virtual Size2 get_minimum_size() const;
ScriptEditorDebugger(EditorNode *p_editor=NULL);
~ScriptEditorDebugger();