You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user