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

Function text_asset_preview

perro_editor/res/scripts/ui/editor_ui.rs:2496–2520  ·  view source on GitHub ↗
(project_root: &str, path: &str)

Source from the content-addressed store, hash-verified

2494 total / parent_child_total
2495 } else {
2496 total
2497 };
2498 let row_w = 0.95;
2499 set_ui_node_size(ctx, &format!("inspector_var_row_{idx}"), (row_w, root_h));
2500 set_ui_node_h_align(
2501 ctx,
2502 &format!("inspector_var_row_{idx}"),
2503 UiHorizontalAlign::Center,
2504 );
2505 set_ui_node_size(ctx, &format!("inspector_var_row_{idx}_stack"), (1.0, 1.0));
2506 set_ui_node_size(
2507 ctx,
2508 &format!("inspector_var_row_{idx}_inner"),
2509 (1.0, base / total),
2510 );
2511 set_ui_node_size(ctx, &format!("inspector_var_row_{idx}_header"), (1.0, 1.0));
2512 let children_name = format!("inspector_var_row_{idx}_children");
2513 set_ui_node_size(ctx, &children_name, (1.0, child_total / total));
2514 set_vlayout_h_align(ctx, &children_name, UiHorizontalAlign::Center);
2515 set_vlayout_spacing_padding(
2516 ctx,
2517 &children_name,
2518 if row.is_some_and(|row| row.source == "section") {
2519 0.002
2520 } else {
2521 0.001
2522 },
2523 0.0,

Callers 1

asset_detail_textFunction · 0.85

Calls 3

res_to_absFunction · 0.70
load_stringFunction · 0.50
is_emptyMethod · 0.45

Tested by

no test coverage detected