summaryrefslogtreecommitdiff
path: root/core/src/Model/GlobalStates.hpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-03-31 20:19:18 -0700
committerrtk0c <[email protected]>2021-03-31 20:19:18 -0700
commit44f5fa5c8f258e8fc1f7d7e2e45e0485bd6cc490 (patch)
tree3f09a1cce46d38f5a8c6266150e67af3802d4b95 /core/src/Model/GlobalStates.hpp
parent31950890c939862f79c817053c106bf711c63a64 (diff)
Complete items tab (UI and serialization)
Diffstat (limited to 'core/src/Model/GlobalStates.hpp')
-rw-r--r--core/src/Model/GlobalStates.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/Model/GlobalStates.hpp b/core/src/Model/GlobalStates.hpp
index e6d823b..8375569 100644
--- a/core/src/Model/GlobalStates.hpp
+++ b/core/src/Model/GlobalStates.hpp
@@ -10,6 +10,7 @@
class GlobalStates {
public:
static void Init();
+ static void Init(std::filesystem::path userDataDir);
static void Shutdown();
static GlobalStates& GetInstance();
@@ -31,6 +32,10 @@ public:
const std::vector<RecentProject>& GetRecentProjects() const;
void ClearRecentProjects();
void AddRecentProject(const Project& project);
+ /// Move or add the project to end of the recent projects list.
+ /// If the project is not in the list of recently used projects, it will be appended, otherwise
+ /// it will be moved to the end.
+ void MoveProjectToTop(const Project& project);
void RemoveRecentProject(int idx);
// TODO async autosaving to prevent data loss on crash