diff options
author | Paulb23 <p_batty@hotmail.co.uk> | 2020-07-26 15:57:23 +0100 |
---|---|---|
committer | Paulb23 <p_batty@hotmail.co.uk> | 2020-09-10 20:35:28 +0100 |
commit | 4d7df24d46f931839247a9886c485ed244d1c8ee (patch) | |
tree | 9f14dc892815039d3c2ec7984913dbb531d0ca8f /modules/visual_script | |
parent | 907f9f2a8444be195d489ae614f88018a10cf6ce (diff) |
Add main_gutter (breakpoints, bookmarks, execution lines) to code_edit
Diffstat (limited to 'modules/visual_script')
-rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 6 | ||||
-rw-r--r-- | modules/visual_script/visual_script_editor.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 5581ea9318..7c3af016b9 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -2682,7 +2682,8 @@ void VisualScriptEditor::reload(bool p_soft) { _update_graph(); } -void VisualScriptEditor::get_breakpoints(List<int> *p_breakpoints) { +Array VisualScriptEditor::get_breakpoints() { + Array breakpoints; List<StringName> functions; script->get_function_list(&functions); for (List<StringName>::Element *E = functions.front(); E; E = E->next()) { @@ -2691,10 +2692,11 @@ void VisualScriptEditor::get_breakpoints(List<int> *p_breakpoints) { for (List<int>::Element *F = nodes.front(); F; F = F->next()) { Ref<VisualScriptNode> vsn = script->get_node(E->get(), F->get()); if (vsn->is_breakpoint()) { - p_breakpoints->push_back(F->get() - 1); //subtract 1 because breakpoints in text start from zero + breakpoints.push_back(F->get() - 1); //subtract 1 because breakpoints in text start from zero } } } + return breakpoints; } void VisualScriptEditor::add_callback(const String &p_function, PackedStringArray p_args) { diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h index 0c5665cee8..b5d5589250 100644 --- a/modules/visual_script/visual_script_editor.h +++ b/modules/visual_script/visual_script_editor.h @@ -312,7 +312,7 @@ public: virtual void ensure_focus() override; virtual void tag_saved_version() override; virtual void reload(bool p_soft) override; - virtual void get_breakpoints(List<int> *p_breakpoints) override; + virtual Array get_breakpoints() override; virtual void add_callback(const String &p_function, PackedStringArray p_args) override; virtual void update_settings() override; virtual bool show_members_overview() override; |