diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index 1c999821550..ee0169027b5 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -335,7 +335,7 @@ private: hide(); - emit_signal("project_created"); + emit_signal("project_created", dir); } @@ -882,6 +882,7 @@ void ProjectManager::_load_recent_projects() { hb->add_child(tf); VBoxContainer *vb = memnew(VBoxContainer); + vb->set_name("project"); hb->add_child(vb); Control *ec = memnew( Control ); ec->set_custom_minimum_size(Size2(0,1)); @@ -891,6 +892,7 @@ void ProjectManager::_load_recent_projects() { title->add_color_override("font_color",font_color); vb->add_child(title); Label *fpath = memnew( Label(path) ); + fpath->set_name("path"); vb->add_child(fpath); fpath->set_opacity(0.5); fpath->add_color_override("font_color",font_color); @@ -912,6 +914,43 @@ void ProjectManager::_load_recent_projects() { tabs->set_current_tab(0); } +void ProjectManager::_on_project_created(const String& dir) { + bool has_already=false; + for (int i=0;iget_child_count();i++) { + HBoxContainer *hb=scroll_childs->get_child(i)->cast_to(); + Label *fpath=hb->get_node(NodePath("project/path"))->cast_to