mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Add String.is_valid_unicode_identifier()
- Adds `is_valid_unicode_identifier()` - Adds `is_valid_ascii_identifier()` - Deprecates `is_valid_identifier()` - Renames `validate_identifier()` to `validate_ascii_identifier()`
This commit is contained in:
parent
db76de5de8
commit
8bf4ecc026
22 changed files with 132 additions and 60 deletions
|
@ -1590,7 +1590,7 @@ void VisualShaderEditor::clear_custom_types() {
|
|||
}
|
||||
|
||||
void VisualShaderEditor::add_custom_type(const String &p_name, const String &p_type, const Ref<Script> &p_script, const String &p_description, int p_return_icon_type, const String &p_category, bool p_highend) {
|
||||
ERR_FAIL_COND(!p_name.is_valid_identifier());
|
||||
ERR_FAIL_COND(!p_name.is_valid_ascii_identifier());
|
||||
ERR_FAIL_COND(p_type.is_empty() && !p_script.is_valid());
|
||||
|
||||
for (int i = 0; i < add_options.size(); i++) {
|
||||
|
@ -5791,7 +5791,7 @@ void VisualShaderEditor::_varying_create() {
|
|||
}
|
||||
|
||||
void VisualShaderEditor::_varying_name_changed(const String &p_name) {
|
||||
if (!p_name.is_valid_identifier()) {
|
||||
if (!p_name.is_valid_ascii_identifier()) {
|
||||
varying_error_label->show();
|
||||
varying_error_label->set_text(TTR("Invalid name for varying."));
|
||||
add_varying_dialog->get_ok_button()->set_disabled(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue