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

Function set_button_fill

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

Source from the content-addressed store, hash-verified

3777 let Some(key) = state
3778 .selected_key
3779 .or_else(|| doc.scene.root.map(|key| key.as_u32()))
3780 else {
3781 return "target: scene root".to_string();
3782 };
3783 let Some(node) = cached_scene_node(&state.doc_text, key) else {
3784 return "target: scene root".to_string();
3785 };
3786 if state.add_node_as_sibling {
3787 let parent = node
3788 .parent
3789 .map(|key| doc.scene.key_name_or_id(key).to_string())
3790 .unwrap_or_else(|| "scene root".to_string());
3791 let kind = picker_parent_node_kind(state).unwrap_or("Root");
3792 return format!(
3793 "as sibling of {} parent: {parent} kind={kind} Tab toggles",
3794 doc.scene.key_name_or_id(node.key)
3795 );

Callers 4

refresh_chrome_viewFunction · 0.85
refresh_tabs_viewFunction · 0.85
refresh_inspector_viewFunction · 0.85
set_row_stateFunction · 0.85

Calls 1

find_namedFunction · 0.85

Tested by

no test coverage detected