diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-02-21 10:32:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-21 10:32:55 +0100 |
commit | ba48417147efef6c17d0e1d1a0f9f11b75c2648e (patch) | |
tree | cd53e867a07c9cca370e23b20d54c516c6799131 /editor | |
parent | 5d6c64969cea4f1678ed3760c0353f8860ef661b (diff) | |
parent | 1fdb8251d2d68634d8ba7ad4e9569742847df1df (diff) |
Merge pull request #16878 from KidRigger/master
Godot now allows built-in irrespective of the filepath.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/script_create_dialog.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index e56a7f2a55..b893b098ac 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -535,15 +535,19 @@ void ScriptCreateDialog::_update_dialog() { /* Is Script created or loaded from existing file */ - if (is_new_script_created) { + if (is_built_in) { + get_ok()->set_text(TTR("Create")); + parent_name->set_editable(true); + parent_browse_button->set_disabled(false); + internal->set_disabled(!supports_built_in); + _msg_path_valid(true, TTR("Built-in script (into scene file)")); + } else if (is_new_script_created) { // New Script Created get_ok()->set_text(TTR("Create")); parent_name->set_editable(true); parent_browse_button->set_disabled(false); internal->set_disabled(!supports_built_in); - if (is_built_in) { - _msg_path_valid(true, TTR("Built-in script (into scene file)")); - } else if (is_path_valid) { + if (is_path_valid) { _msg_path_valid(true, TTR("Create new script file")); } } else { @@ -551,7 +555,7 @@ void ScriptCreateDialog::_update_dialog() { get_ok()->set_text(TTR("Load")); parent_name->set_editable(false); parent_browse_button->set_disabled(true); - internal->set_disabled(true); + internal->set_disabled(!supports_built_in); if (is_path_valid) { _msg_path_valid(true, TTR("Load existing script file")); } |