MCPcopy Create free account
hub / github.com/PerroEngine/Perro / set_ui_node_z_index

Function set_ui_node_z_index

perro_editor/res/scripts/ui/editor_ui.rs:4020–4030  ·  view source on GitHub ↗
(
    ctx: &mut ScriptContext<'_, API>,
    name: &str,
    z_index: i32,
)

Source from the content-addressed store, hash-verified

4018 if !doc.scene.key_names.iter().any(|item| item.as_ref() == name) {
4019 return name;
4020 }
4021 }
4022 format!("{prefix}_x")
4023}
4024
4025pub fn sanitize_node_name(text: &str) -> String {
4026 let mut out = String::new();
4027 for ch in text.trim().chars() {
4028 if ch.is_ascii_alphanumeric() || ch == '_' {
4029 out.push(ch);
4030 } else if ch.is_whitespace() || ch == '-' || ch == '.' {
4031 out.push('_');
4032 }
4033 }

Callers 1

Calls 1

find_namedFunction · 0.85

Tested by

no test coverage detected