From 44f5fa5c8f258e8fc1f7d7e2e45e0485bd6cc490 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Wed, 31 Mar 2021 20:19:18 -0700 Subject: Complete items tab (UI and serialization) --- core/src/Model/GlobalStates.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/src/Model/GlobalStates.hpp') 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& 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 -- cgit v1.2.3-70-g09d2