You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Allow auto-generated node names in PopupMenu::add_submenu_item
This commit is contained in:
@@ -4699,11 +4699,16 @@ String String::property_name_encode() const {
|
||||
|
||||
static const char32_t invalid_node_name_characters[] = { '.', ':', '@', '/', '\"', UNIQUE_NODE_PREFIX[0], 0 };
|
||||
|
||||
String String::get_invalid_node_name_characters() {
|
||||
String String::get_invalid_node_name_characters(bool p_allow_internal) {
|
||||
// Do not use this function for critical validation.
|
||||
String r;
|
||||
const char32_t *c = invalid_node_name_characters;
|
||||
while (*c) {
|
||||
if (p_allow_internal && *c == '@') {
|
||||
c++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c != invalid_node_name_characters) {
|
||||
r += " ";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user