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/editor_debugger_node.h | |
parent | 74051c77dc3ec1548f8efedfd892a0b2ad3537ad (diff) |
Threaded networking for editor debugger.
Diffstat (limited to 'editor/debugger/editor_debugger_node.h')
-rw-r--r-- | editor/debugger/editor_debugger_node.h | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h index 13a1d6dcb3..6181ccdb5f 100644 --- a/editor/debugger/editor_debugger_node.h +++ b/editor/debugger/editor_debugger_node.h @@ -31,17 +31,30 @@ #ifndef EDITOR_DEBUGGER_NODE_H #define EDITOR_DEBUGGER_NODE_H -#include "core/io/tcp_server.h" -#include "editor/debugger/script_editor_debugger.h" -#include "scene/gui/button.h" -#include "scene/gui/tab_container.h" +#include "editor/debugger/editor_debugger_server.h" +#include "scene/gui/margin_container.h" +class Button; class EditorDebuggerTree; +class EditorDebuggerRemoteObject; +class MenuButton; +class ScriptEditorDebugger; +class TabContainer; class EditorDebuggerNode : public MarginContainer { GDCLASS(EditorDebuggerNode, MarginContainer); +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 Options { DEBUG_NEXT, @@ -71,7 +84,7 @@ private: } }; - Ref<TCP_Server> server = NULL; + Ref<EditorDebuggerServer> server; TabContainer *tabs = NULL; Button *debugger_button = NULL; MenuButton *script_menu = NULL; @@ -87,7 +100,7 @@ private: bool auto_switch_remote_scene_tree = false; bool debug_with_external_editor = false; bool hide_on_stop = true; - ScriptEditorDebugger::CameraOverride camera_override = ScriptEditorDebugger::OVERRIDE_NONE; + CameraOverride camera_override = OVERRIDE_NONE; Map<Breakpoint, bool> breakpoints; ScriptEditorDebugger *_add_debugger(); @@ -130,10 +143,10 @@ public: ScriptEditorDebugger *get_default_debugger() const; ScriptEditorDebugger *get_debugger(int p_debugger) const; - void debug_next() { get_default_debugger()->debug_next(); } - void debug_step() { get_default_debugger()->debug_step(); } - void debug_break() { get_default_debugger()->debug_break(); } - void debug_continue() { get_default_debugger()->debug_continue(); } + void debug_next(); + void debug_step(); + void debug_break(); + void debug_continue(); void set_script_debug_button(MenuButton *p_button); @@ -141,7 +154,7 @@ public: debugger_button = p_button; } - String get_var_value(const String &p_var) const { return get_default_debugger()->get_var_value(p_var); } + String get_var_value(const String &p_var) const; Ref<Script> get_dump_stack_script() const { return stack_script; } // Why do we need this? bool get_debug_with_external_editor() { return debug_with_external_editor; } @@ -167,8 +180,8 @@ public: void live_debug_reparent_node(const NodePath &p_at, const NodePath &p_new_place, const String &p_new_name, int p_at_pos); // Camera - void set_camera_override(ScriptEditorDebugger::CameraOverride p_override) { camera_override = p_override; } - ScriptEditorDebugger::CameraOverride get_camera_override() { return camera_override; } + void set_camera_override(CameraOverride p_override) { camera_override = p_override; } + CameraOverride get_camera_override() { return camera_override; } Error start(); |