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

Function open_recent_project

perro_editor/res/scripts/assets/editor_assets.rs:218–230  ·  view source on GitHub ↗
(ctx: &mut ScriptContext<'_, API>, idx: usize)

Source from the content-addressed store, hash-verified

216 set_project_manager(ctx, true);
217 }
218 }
219 Err(err) => {
220 set_log(
221 ctx,
222 &format!("create project fail\n{parent}\n{name}\n{err}"),
223 );
224 refresh_all(ctx);
225 }
226 }
227}
228
229pub fn open_recent_project<API: ScriptAPI + ?Sized>(ctx: &mut ScriptContext<'_, API>, idx: usize) {
230 let path = with_state!(ctx.run, EditorState, ctx.id, |state| {
231 state.recent_projects.get(idx).cloned()
232 }).unwrap_or_default();
233 let Some(path) = path else {

Callers

nothing calls this directly

Calls 5

open_projectFunction · 0.85
set_logFunction · 0.85
refresh_recent_projectsFunction · 0.85
set_project_managerFunction · 0.85
cloneMethod · 0.80

Tested by

no test coverage detected