refactor(editor): enhance MenuOrchestrator with new UI controls and editor actions

- Expanded MenuOrchestrator to include additional UI visibility controls and editor action delegations, improving user interaction and functionality.
- Introduced methods for showing global search, performance dashboard, and ImGui metrics, along with editor actions like undo, redo, cut, copy, paste, and find.
- Updated the EditorManager to support new functionalities, including session management and layout presets.

Benefits:
- Streamlines user experience by providing quick access to essential features and enhancing the overall architecture of the editor.
- Improves maintainability by clearly defining roles for UI and editor operations within the MenuOrchestrator.
This commit is contained in:
scawful
2025-10-15 00:50:35 -04:00
parent 2250f03f7d
commit 12480626f7
6 changed files with 359 additions and 102 deletions

View File

@@ -171,12 +171,26 @@ std::string RomFileManager::GetRomTitle() const {
}
absl::Status RomFileManager::ValidateRom() {
if (!IsRomLoaded()) {
return absl::FailedPreconditionError("No ROM loaded to validate");
return ValidateRom(current_rom_);
}
absl::Status RomFileManager::ValidateRom(Rom* rom) {
if (!rom || !rom->is_loaded()) {
return absl::FailedPreconditionError("No valid ROM to validate");
}
// TODO: Implement ROM validation logic
// This would check ROM integrity, checksums, etc.
// This would check ROM integrity, checksums, expected data structures, etc.
// Basic validation: check if ROM size is reasonable
if (rom->size() < 512 * 1024 || rom->size() > 8 * 1024 * 1024) {
return absl::InvalidArgumentError("ROM size is outside expected range");
}
// Check if ROM title is readable
if (rom->title().empty()) {
return absl::InvalidArgumentError("ROM title is empty or invalid");
}
if (toast_manager_) {
toast_manager_->Show("ROM validation passed", ToastType::kSuccess);