diff options
| author | Will Nations | 2017-12-13 11:41:28 -0600 |
|---|---|---|
| committer | Will Nations | 2017-12-13 22:14:17 -0600 |
| commit | c38cd9b963ad75e41a62b0b3fb3c65af891effc3 (patch) | |
| tree | b254c2ef8cce06f8f12e56f0797f45d71be25a19 /editor/plugins/script_editor_plugin.cpp | |
| parent | aa6772d7abb3ff1ff77b1b658617904bb0af1fbb (diff) | |
| download | godot-c38cd9b963ad75e41a62b0b3fb3c65af891effc3.tar.gz godot-c38cd9b963ad75e41a62b0b3fb3c65af891effc3.tar.zst godot-c38cd9b963ad75e41a62b0b3fb3c65af891effc3.zip | |
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index c02b3458e..d90d3efd6 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1845,6 +1845,11 @@ void ScriptEditor::apply_scripts() const { } } +void ScriptEditor::open_script_create_dialog(const String &p_base_name, const String &p_base_path) { + _menu_option(FILE_NEW); + script_create_dialog->config(p_base_name, p_base_path); +} + void ScriptEditor::_editor_play() { debugger->start(); @@ -2548,6 +2553,7 @@ void ScriptEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("get_current_script"), &ScriptEditor::_get_current_script); ClassDB::bind_method(D_METHOD("get_open_scripts"), &ScriptEditor::_get_open_scripts); + ClassDB::bind_method(D_METHOD("open_script_create_dialog", "base_name", "base_path"), &ScriptEditor::open_script_create_dialog); ADD_SIGNAL(MethodInfo("editor_script_changed", PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script"))); ADD_SIGNAL(MethodInfo("script_close", PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script"))); |
