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

Function set_label

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

Source from the content-addressed store, hash-verified

3707}
3708
3709pub fn file_path_matches_filter(path: &str, filter: &NodePickerFilter) -> bool {
3710 let hay = format!(
3711 "{} {} {} {}",
3712 path.to_ascii_lowercase(),
3713 editor_files::rel_label(path).to_ascii_lowercase(),
3714 editor_files::kind_label(path).to_ascii_lowercase(),
3715 editor_files::display_kind_label(path).to_ascii_lowercase()
3716 );
3717 filter.text.iter().all(|needle| hay.contains(needle))
3718 && filter.tags.iter().all(|tag| file_path_has_tag(path, tag))
3719}
3720
3721pub fn file_path_has_tag(path: &str, tag: &str) -> bool {
3722 let kind = editor_files::kind_label(path);
3723 let badge = editor_files::display_kind_label(path).to_ascii_lowercase();
3724 match tag {

Callers 13

update_freecamFunction · 0.85
update_freecam_2dFunction · 0.85
update_ui_canvasFunction · 0.85
refresh_chrome_viewFunction · 0.85
refresh_manager_viewFunction · 0.85
refresh_node_picker_viewFunction · 0.85
refresh_tabs_viewFunction · 0.85
refresh_inspector_viewFunction · 0.85
refresh_status_viewFunction · 0.85
apply_component_rowFunction · 0.85

Calls 1

find_namedFunction · 0.85

Tested by

no test coverage detected