diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-07-10 15:17:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-10 15:17:44 +0200 |
commit | fd9ef1bb34bdc3ee982d83cc3ac6d7c82ac63e2e (patch) | |
tree | 29704ce9c8f814480c79a99511d16b01e9b8305a | |
parent | 351163ce9530acd201c99be5b1082198c5449ef2 (diff) | |
parent | 19941110370a8150a6ad8d293bfe2c22892e8669 (diff) |
Merge pull request #30488 from Ev1lbl0w/invalid-classname-fix
Allow class names with dots in create script popup
-rw-r--r-- | editor/script_create_dialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index bebfe6d3a1..ed9a24311d 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -126,7 +126,7 @@ bool ScriptCreateDialog::_validate_class(const String &p_string) { return false; // no start with number plz } - bool valid_char = (p_string[i] >= '0' && p_string[i] <= '9') || (p_string[i] >= 'a' && p_string[i] <= 'z') || (p_string[i] >= 'A' && p_string[i] <= 'Z') || p_string[i] == '_'; + bool valid_char = (p_string[i] >= '0' && p_string[i] <= '9') || (p_string[i] >= 'a' && p_string[i] <= 'z') || (p_string[i] >= 'A' && p_string[i] <= 'Z') || p_string[i] == '_' || p_string[i] == '.'; if (!valid_char) return false; @@ -528,7 +528,7 @@ void ScriptCreateDialog::_update_dialog() { if (has_named_classes) { if (is_new_script_created) { class_name->set_editable(true); - class_name->set_placeholder(TTR("Allowed: a-z, A-Z, 0-9 and _")); + class_name->set_placeholder(TTR("Allowed: a-z, A-Z, 0-9, _ and .")); class_name->set_placeholder_alpha(0.3); } else { class_name->set_editable(false); |