diff options
author | 2025-02-15 20:53:19 -0500 | |
---|---|---|
committer | 2025-02-15 20:53:19 -0500 | |
commit | 9e5f782eb228a6b050b01d5c4c82dba1399f7172 (patch) | |
tree | 2fe21e55d073b3ee5b31ef05c3e036bec71c2b03 /src/resources.rs | |
parent | a1e9304dc31980703446bdb33246e314bafd3b15 (diff) |
directory-aware navigation
Diffstat (limited to 'src/resources.rs')
-rw-r--r-- | src/resources.rs | 8 |
1 files changed, 5 insertions, 3 deletions
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<PathBuf>); /// 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<DirworldEntityPayload>, } +#[derive(Resource, Deref, DerefMut, Default, Debug)] +pub struct DirworldLastDir(pub PathBuf); + /// Running background tasks #[derive(Default, Resource, Deref, DerefMut)] -pub struct DirworldTasks(pub BTreeMap<String, Task<Option<CommandQueue>>>); +pub struct DirworldTasks(pub BTreeMap<String, Option<Task<Option<CommandQueue>>>>); /// 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, } - |