feat: Add Emulator Editor Type and UI Enhancements
- Introduced a new editor type for the emulator, allowing users to access emulator functionalities directly from the editor manager. - Updated the editor selection dialog to include the emulator option with appropriate descriptions and shortcuts. - Enhanced the emulator interface with modern theming and improved layout for better user experience. - Implemented various UI components for performance monitoring, AI agent integration, and save state management, enriching the emulator's capabilities.
This commit is contained in:
@@ -53,6 +53,7 @@ struct EditorContext {
|
||||
enum class EditorType {
|
||||
kAssembly,
|
||||
kDungeon,
|
||||
kEmulator,
|
||||
kGraphics,
|
||||
kMusic,
|
||||
kOverworld,
|
||||
@@ -65,9 +66,9 @@ enum class EditorType {
|
||||
kSettings,
|
||||
};
|
||||
|
||||
constexpr std::array<const char*, 12> kEditorNames = {
|
||||
"Assembly", "Dungeon", "Graphics", "Music", "Overworld",
|
||||
"Palette", "Screen", "Sprite", "Message", "Hex", "Agent", "Settings",
|
||||
constexpr std::array<const char*, 13> kEditorNames = {
|
||||
"Assembly", "Dungeon", "Emulator", "Graphics", "Music", "Overworld",
|
||||
"Palette", "Screen", "Sprite", "Message", "Hex", "Agent", "Settings",
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -468,6 +468,9 @@ void EditorManager::Initialize(const std::string& filename) {
|
||||
case EditorType::kAssembly:
|
||||
show_asm_editor_ = true;
|
||||
break;
|
||||
case EditorType::kEmulator:
|
||||
show_emulator_ = true;
|
||||
break;
|
||||
case EditorType::kSettings:
|
||||
current_editor_set_->settings_editor_.set_active(true);
|
||||
break;
|
||||
|
||||
@@ -56,6 +56,10 @@ EditorSelectionDialog::EditorSelectionDialog() {
|
||||
"Direct ROM memory editing and comparison", "Ctrl+0", false, true,
|
||||
ImVec4(0.2f, 0.8f, 0.4f, 1.0f)}, // Matrix green
|
||||
|
||||
{EditorType::kEmulator, "Emulator", ICON_MD_VIDEOGAME_ASSET,
|
||||
"Test and debug your ROM in real-time with live debugging", "Ctrl+Shift+E", false, true,
|
||||
ImVec4(0.2f, 0.6f, 1.0f, 1.0f)}, // Emulator blue
|
||||
|
||||
{EditorType::kAgent, "AI Agent", ICON_MD_SMART_TOY,
|
||||
"Configure AI agent, collaboration, and automation", "Ctrl+Shift+A", false, false,
|
||||
ImVec4(0.8f, 0.4f, 1.0f, 1.0f)}, // Purple/magenta
|
||||
@@ -279,9 +283,7 @@ void EditorSelectionDialog::DrawEditorCard(const EditorInfo& info, int index) {
|
||||
// Draw shortcut hint if available
|
||||
if (info.shortcut && info.shortcut[0]) {
|
||||
ImGui::SetCursorScreenPos(ImVec2(cursor_pos.x + 10, cursor_pos.y + button_size.y - 20));
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.6f, 0.6f, 0.6f, 1.0f));
|
||||
ImGui::Text("%s", info.shortcut);
|
||||
ImGui::PopStyleColor();
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f), "%s", info.shortcut);
|
||||
}
|
||||
|
||||
// Hover glow effect
|
||||
|
||||
Reference in New Issue
Block a user