Implement SaveRomAs functionality and enhance session management

- Added SaveRomAs method to allow users to save ROM files with specified filenames, ensuring proper file extensions are applied.
- Updated the DrawMenuBar method to utilize SaveRomAs, providing feedback on save success or failure through toast notifications.
- Enhanced session management by introducing RemoveSession method to mark sessions as closed instead of removing them, improving user experience when managing active sessions.
- Updated session handling logic to ensure closed sessions are properly skipped in the UI, maintaining clarity in session management.
This commit is contained in:
scawful
2025-09-27 09:42:51 -04:00
parent fff706b38e
commit 730d01fcff
2 changed files with 178 additions and 26 deletions

View File

@@ -117,6 +117,7 @@ class EditorManager {
absl::Status LoadRom();
absl::Status LoadAssets();
absl::Status SaveRom();
absl::Status SaveRomAs(const std::string& filename);
absl::Status OpenRomOrProject(const std::string& filename);
// Enhanced project management
@@ -220,8 +221,10 @@ class EditorManager {
void CreateNewSession();
void DuplicateCurrentSession();
void CloseCurrentSession();
void RemoveSession(size_t index);
void SwitchToSession(size_t index);
size_t GetCurrentSessionIndex() const;
size_t GetActiveSessionCount() const;
void ResetWorkspaceLayout();
// Multi-session editor management