From 9e5f782eb228a6b050b01d5c4c82dba1399f7172 Mon Sep 17 00:00:00 2001 From: Silas Bartha Date: Sat, 15 Feb 2025 20:53:19 -0500 Subject: directory-aware navigation --- src/resources.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/resources.rs') diff --git a/src/resources.rs b/src/resources.rs index bf0c072..f916deb 100644 --- a/src/resources.rs +++ b/src/resources.rs @@ -12,16 +12,19 @@ pub struct DirworldRootDir(pub Option); /// Current directory of the world #[derive(Resource, Default)] -pub struct DirworldCurrentDir{ +pub struct DirworldCurrentDir { /// Path of current directory pub path: PathBuf, /// Payload (contents of .door file) in current directory, if present pub payload: Option, } +#[derive(Resource, Deref, DerefMut, Default, Debug)] +pub struct DirworldLastDir(pub PathBuf); + /// Running background tasks #[derive(Default, Resource, Deref, DerefMut)] -pub struct DirworldTasks(pub BTreeMap>>); +pub struct DirworldTasks(pub BTreeMap>>>); /// A map between file types and their corresponding preload/spawn callback observers #[derive(Debug, Default, Resource, Deref, DerefMut)] @@ -39,4 +42,3 @@ pub enum EntryType { /// A folder Folder, } - -- cgit v1.2.3