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

Function set_panel_visible

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

Source from the content-addressed store, hash-verified

4197 let _ = ctx.run.Nodes().set_node_name(panel, "script_reload_popup");
4198 let _ = ctx
4199 .run
4200 .Nodes()
4201 .set_node_name(label, "script_reload_popup_label");
4202 let _ = ctx.run.Nodes().reparent(ctx.id, panel);
4203 let _ = ctx.run.Nodes().reparent(panel, label);
4204 let _ = with_node_mut!(ctx.run, UiPanel, panel, |node| {
4205 node.layout.anchor = UiAnchor::Center;
4206 node.layout.size = UiVector2::ratio(0.16, 0.052);
4207 node.layout.z_index = 500;
4208 node.transform.position = UiVector2::percent(50.0, 50.0);
4209 node.transform.pivot = UiVector2::percent(50.0, 50.0);
4210 node.style.fill = Color::from_hex("#23272DF2").unwrap_or(node.style.fill);
4211 node.style.stroke = Color::from_hex("#6BA0EA").unwrap_or(node.style.stroke);
4212 node.style.stroke_width = 1.0;
4213 node.style.set_corner_radius(0.06);

Callers 2

apply_editor_gizmosFunction · 0.70

Calls 1

find_namedFunction · 0.85

Tested by

no test coverage detected