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

Function refresh_tabs_view

perro_editor/res/scripts/ui/editor_ui.rs:258–290  ·  view source on GitHub ↗
(ctx: &mut ScriptContext<'_, API>, view: &EditorView)

Source from the content-addressed store, hash-verified

256 // Picker labels reference the selected node ("add child of X").
257 refresh_node_picker_view(ctx, &view);
258 refresh_scene_pane_view(ctx, &view);
259 refresh_inspector_view(ctx, &view);
260}
261
262/// File/asset selection: chrome, file panel, inspector. Skips scene pane.
263pub fn refresh_asset_panels<API: ScriptAPI + ?Sized>(ctx: &mut ScriptContext<'_, API>) {
264 capture_editor_output(ctx);
265 sync_selected_skeleton_bones(ctx);
266 let view = with_state!(ctx.run, EditorState, ctx.id, EditorView::from_state).unwrap_or_default();
267 refresh_chrome_view(ctx, &view);
268 refresh_files_view(ctx, &view);
269 refresh_inspector_view(ctx, &view);
270}
271
272fn refresh_chrome_view<API: ScriptAPI + ?Sized>(ctx: &mut ScriptContext<'_, API>, view: &EditorView) {
273 let layout = editor_layout_metrics(view.bottom_dock_open, view.distraction_free);
274 set_button_fill(
275 ctx,
276 "distraction_free_button",
277 if view.distraction_free { theme::ACCENT } else { theme::BG_WIDGET },
278 );
279 set_label(
280 ctx,
281 "project_status",
282 &format!("{} {}", view.project_name, view.project_root),
283 );
284 set_label(ctx, "status_bar", &view.status);
285 set_label(ctx, "log_text", &view.log);
286 set_label(ctx, "bottom_log_label", &format!("Output {}", view.output_count));
287 set_text_box(ctx, "output_filter_box", &view.output_filter);
288 for (name, visible) in [
289 ("output_info_button", view.output_info_visible),
290 ("output_warn_button", view.output_warn_visible),
291 ("output_error_button", view.output_error_visible),
292 ] {
293 set_button_fill(ctx, name, if visible { theme::ACCENT } else { theme::BG_WIDGET });

Callers 1

refresh_allFunction · 0.85

Calls 7

set_labelFunction · 0.85
short_pathFunction · 0.85
set_ui_displayFunction · 0.85
set_button_fillFunction · 0.85
anyMethod · 0.80
getMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected