diff options
| author | Juan Linietsky | 2016-08-05 22:46:45 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-08-05 22:48:00 -0300 |
| commit | 259418f8275371fc2f0bab6892caa4ef66b84240 (patch) | |
| tree | 721e21ff566212918bf837f45c7687ce32213032 /tools/editor/script_create_dialog.cpp | |
| parent | 6d5d23fa8de8673f4a2b312c05588fd4e7195543 (diff) | |
| download | godot-259418f8275371fc2f0bab6892caa4ef66b84240.tar.gz godot-259418f8275371fc2f0bab6892caa4ef66b84240.tar.zst godot-259418f8275371fc2f0bab6892caa4ef66b84240.zip | |
VisualScript can now execute visual scripts, but there is no debugger or profiler yet.
Diffstat (limited to 'tools/editor/script_create_dialog.cpp')
| -rw-r--r-- | tools/editor/script_create_dialog.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/editor/script_create_dialog.cpp b/tools/editor/script_create_dialog.cpp index e93a40efb..749198314 100644 --- a/tools/editor/script_create_dialog.cpp +++ b/tools/editor/script_create_dialog.cpp @@ -117,20 +117,20 @@ void ScriptCreateDialog::ok_pressed() { - String text = ScriptServer::get_language( language_menu->get_selected() )->get_template(cname,parent_name->get_text()); - Script *script = ScriptServer::get_language( language_menu->get_selected() )->create_script(); - script->set_source_code(text); - if (cname!="") - script->set_name(cname); + Ref<Script> scr = ScriptServer::get_language( language_menu->get_selected() )->get_template(cname,parent_name->get_text()); + //scr->set_source_code(text); + + + if (cname!="") + scr->set_name(cname); - Ref<Script> scr(script); if (!internal->is_pressed()) { String lpath = Globals::get_singleton()->localize_path(file_path->get_text()); - script->set_path(lpath); + scr->set_path(lpath); if (!path_valid) { alert->set_text(TTR("Invalid path!")); @@ -145,7 +145,7 @@ void ScriptCreateDialog::ok_pressed() { alert->popup_centered_minsize(); return; } - scr->set_path(lpath); + //scr->set_path(lpath); //EditorFileSystem::get_singleton()->update_file(lpath,scr->get_type()); |
