diff options
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
| -rw-r--r-- | editor/plugins/script_text_editor.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 2d3a14e525..83741c7fb8 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -218,6 +218,10 @@ void ScriptTextEditor::add_callback(const String &p_function, PoolStringArray p_ code_editor->get_text_edit()->cursor_set_column(1); } +bool ScriptTextEditor::show_members_overview() { + return true; +} + void ScriptTextEditor::update_settings() { code_editor->update_editor_settings(); @@ -553,6 +557,8 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo if (!bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))) return; + ERR_FAIL_COND(!get_tree()); + Set<Ref<Script> > scripts; Node *base = get_tree()->get_edited_scene_root(); @@ -1087,6 +1093,10 @@ Control *ScriptTextEditor::get_edit_menu() { return edit_hb; } +void ScriptTextEditor::clear_edit_menu() { + memdelete(edit_hb); +} + void ScriptTextEditor::reload(bool p_soft) { TextEdit *te = code_editor->get_text_edit(); @@ -1236,8 +1246,8 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) { int col, row; TextEdit *tx = code_editor->get_text_edit(); - tx->_get_mouse_pos(mb->get_global_pos() - tx->get_global_position(), row, col); - Vector2 mpos = mb->get_global_pos() - tx->get_global_position(); + tx->_get_mouse_pos(mb->get_global_position() - tx->get_global_position(), row, col); + Vector2 mpos = mb->get_global_position() - tx->get_global_position(); bool have_selection = (tx->get_selection_text().length() > 0); bool have_color = (tx->get_word_at_pos(mpos) == "Color"); if (have_color) { |
