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

Function asset_inspector_text

perro_editor/res/scripts/ui/editor_ui.rs:1525–1565  ·  view source on GitHub ↗
(state: &EditorState)

Source from the content-addressed store, hash-verified

1523 "inspector_rotation_box",
1524 "inspector_rotation_mode_row",
1525 "inspector_rotation_row",
1526 "inspector_scale_label",
1527 "inspector_scale_box",
1528 "inspector_scale_row",
1529 ] {
1530 if let Some(id) = find_named(ctx, name) {
1531 let _ = ctx.run.Nodes().remove_node(id);
1532 }
1533 }
1534}
1535
1536fn apply_inspector_dynamic_layout<API: ScriptAPI + ?Sized>(
1537 ctx: &mut ScriptContext<'_, API>,
1538 inspector: &InspectorViewData,
1539) {
1540 let asset_button_w = if inspector.glb_asset_actions {
1541 0.19
1542 } else if inspector.asset_actions {
1543 0.50
1544 } else {
1545 1.0
1546 };
1547 set_button_size(ctx, "asset_use_button", (asset_button_w, 0.62));
1548 for name in [
1549 "asset_glb_anim_button",
1550 "asset_glb_mat_button",
1551 "asset_glb_play_button",
1552 "asset_glb_isolate_button",
1553 ] {
1554 set_button_size(ctx, name, (0.19, 0.62));
1555 }
1556}
1557
1558#[derive(Default)]
1559pub struct EditorView {
1560 project_root: String,
1561 project_name: String,
1562 create_parent_dir: String,
1563 recent_projects: Vec<String>,
1564 file_paths: Vec<String>,
1565 file_filter: String,
1566 file_scope: String,
1567 file_expanded_paths: Vec<String>,
1568 file_dirs_with_children: std::collections::HashSet<String>,

Callers 1

for_assetMethod · 0.85

Calls 7

kind_labelFunction · 0.85
rel_labelFunction · 0.85
asset_ref_textFunction · 0.85
asset_detail_textFunction · 0.85
res_to_absFunction · 0.70
is_gltf_pathFunction · 0.70
as_strMethod · 0.45

Tested by

no test coverage detected