diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-02-24 06:21:15 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-03-08 12:16:09 +0100 |
commit | 540ca05a80e23daafa191cdf24c07b3f8e37b47a (patch) | |
tree | aa4fda23fcc0d8e4ce5bef10df0a7f7ae4ca04ea /editor/debugger/script_editor_debugger.h | |
parent | 74051c77dc3ec1548f8efedfd892a0b2ad3537ad (diff) |
Threaded networking for editor debugger.
Diffstat (limited to 'editor/debugger/script_editor_debugger.h')
-rw-r--r-- | editor/debugger/script_editor_debugger.h | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h index fd034ba983..1fd0713fe5 100644 --- a/editor/debugger/script_editor_debugger.h +++ b/editor/debugger/script_editor_debugger.h @@ -31,14 +31,13 @@ #ifndef SCRIPT_EDITOR_DEBUGGER_H #define SCRIPT_EDITOR_DEBUGGER_H -#include "core/io/packet_peer.h" -#include "core/io/stream_peer_tcp.h" +#include "core/os/os.h" #include "editor/debugger/editor_debugger_inspector.h" -#include "editor/editor_inspector.h" -#include "editor/property_editor.h" -#include "scene/3d/camera.h" -#include "scene/gui/box_container.h" +#include "editor/debugger/editor_debugger_node.h" +#include "editor/debugger/editor_debugger_server.h" +#include "editor/editor_file_dialog.h" #include "scene/gui/button.h" +#include "scene/gui/margin_container.h" class Tree; class EditorNode; @@ -61,16 +60,6 @@ class ScriptEditorDebugger : public MarginContainer { friend class EditorDebuggerNode; -public: - enum CameraOverride { - OVERRIDE_NONE, - OVERRIDE_2D, - OVERRIDE_3D_1, // 3D Viewport 1 - OVERRIDE_3D_2, // 3D Viewport 2 - OVERRIDE_3D_3, // 3D Viewport 3 - OVERRIDE_3D_4 // 3D Viewport 4 - }; - private: enum MessageType { MESSAGE_ERROR, @@ -132,8 +121,7 @@ private: EditorDebuggerInspector *inspector; SceneDebuggerTree *scene_tree; - Ref<StreamPeerTCP> connection; - Ref<PacketPeerStream> ppeer; + Ref<EditorDebuggerPeer> peer; HashMap<NodePath, int> node_path_cache; int last_path_id; @@ -151,7 +139,7 @@ private: bool live_debug; - CameraOverride camera_override; + EditorDebuggerNode::CameraOverride camera_override; void _performance_draw(); void _performance_select(); @@ -216,7 +204,7 @@ public: void request_remote_tree(); const SceneDebuggerTree *get_remote_tree(); - void start(Ref<StreamPeerTCP> p_connection); + void start(Ref<EditorDebuggerPeer> p_peer); void stop(); void debug_skip_breakpoints(); @@ -228,7 +216,7 @@ public: void debug_continue(); bool is_breaked() const { return breaked; } bool is_debuggable() const { return can_debug; } - bool is_session_active() { return connection.is_valid() && connection->is_connected_to_host(); }; + bool is_session_active() { return peer.is_valid() && peer->is_peer_connected(); }; int get_remote_pid() const { return remote_pid; } int get_error_count() const { return error_count; } @@ -252,8 +240,8 @@ public: 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, int p_at_pos); - CameraOverride get_camera_override() const; - void set_camera_override(CameraOverride p_override); + EditorDebuggerNode::CameraOverride get_camera_override() const; + void set_camera_override(EditorDebuggerNode::CameraOverride p_override); void set_breakpoint(const String &p_path, int p_line, bool p_enabled); |