(state: &EditorState)
| 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 | |
| 1536 | fn 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)] |
| 1559 | pub 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>, |
no test coverage detected