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

Function set_text_box

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

Source from the content-addressed store, hash-verified

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 {
3725 "dir" | "folder" => path.ends_with('/'),
3726 "scene" | "scn" => kind == "scene",
3727 "script" | "rs" => kind == "script",
3728 "img" | "image" => kind == "image",
3729 "audio" | "aud" => kind == "audio",
3730 "mesh" => kind == "mesh",
3731 "glb" | "gltf" => badge == "glb",
3732 "anim" | "panim" => path.ends_with(".panim"),
3733 "mat" | "pmat" => path.ends_with(".pmat"),
3734 "res" | "resource" => kind == "resource",
3735 _ => badge.contains(tag) || kind.contains(tag) || path.to_ascii_lowercase().contains(tag),
3736 }
3737}
3738
3739pub fn file_panel_title(state: &EditorState) -> String {
3740 if state.activity_mode == "glb" {
3741 return "GLB Files".to_string();
3742 }
3743 if state.active_asset_path.ends_with('/') {
3744 format!(
3745 "FileSystem {}",

Callers 4

refresh_chrome_viewFunction · 0.85
refresh_node_picker_viewFunction · 0.85
refresh_inspector_viewFunction · 0.85
apply_component_rowFunction · 0.85

Calls 1

find_namedFunction · 0.85

Tested by

no test coverage detected