| 719 | } |
| 720 | |
| 721 | ScriptLanguage::ScriptTemplate ScriptCreateDialog::_get_current_template() const { |
| 722 | int selected_index = template_menu->get_selected(); |
| 723 | for (const ScriptLanguage::ScriptTemplate &t : template_list) { |
| 724 | if (is_using_templates) { |
| 725 | if (t.id == selected_index) { |
| 726 | return t; |
| 727 | } |
| 728 | } else { |
| 729 | // Using empty built-in template if templates are disabled. |
| 730 | if (t.origin == ScriptLanguage::TemplateLocation::TEMPLATE_BUILT_IN && t.name == "Empty") { |
| 731 | return t; |
| 732 | } |
| 733 | } |
| 734 | } |
| 735 | return ScriptLanguage::ScriptTemplate(); |
| 736 | } |
| 737 | |
| 738 | Vector<ScriptLanguage::ScriptTemplate> ScriptCreateDialog::_get_user_templates(const ScriptLanguage *p_language, const StringName &p_object, const String &p_dir, const ScriptLanguage::TemplateLocation &p_origin) const { |
| 739 | Vector<ScriptLanguage::ScriptTemplate> user_templates; |
nothing calls this directly
no test coverage detected