refactor: Replace deprecated dungeon editor guide with updated documentation

- Deleted the old D1-dungeon-editor-guide.md and F1-dungeon-editor-guide.md files to streamline documentation.
- Introduced a new DUNGEON_EDITOR_GUIDE.md that consolidates features, architecture, and usage instructions for the Dungeon Editor.
- Updated the development guide to include new naming conventions and clarified rendering processes.
- Enhanced the overall structure and content of the documentation to reflect the current production-ready status of the Dungeon Editor.
This commit is contained in:
scawful
2025-10-09 20:48:07 -04:00
parent 6c7f301177
commit c512dd7f35
11 changed files with 1026 additions and 3358 deletions

View File

@@ -135,6 +135,60 @@ void DungeonCanvasViewer::DrawDungeonCanvas(int room_id) {
ImGui::EndGroup();
canvas_.DrawBackground();
// Add dungeon-specific context menu items
canvas_.ClearContextMenuItems();
if (rooms_ && rom_->is_loaded()) {
auto& room = (*rooms_)[room_id];
// Add object placement option
canvas_.AddContextMenuItem({
ICON_MD_ADD " Place Object",
[]() {
// TODO: Show object palette/selector
},
"Ctrl+P"
});
// Add object deletion for selected objects
canvas_.AddContextMenuItem({
ICON_MD_DELETE " Delete Selected",
[this]() {
object_interaction_.HandleDeleteSelected();
},
"Del"
});
// Add room property quick toggles
canvas_.AddContextMenuItem({
ICON_MD_LAYERS " Toggle BG1",
[this, room_id]() {
auto& settings = GetRoomLayerSettings(room_id);
settings.bg1_visible = !settings.bg1_visible;
},
"1"
});
canvas_.AddContextMenuItem({
ICON_MD_LAYERS " Toggle BG2",
[this, room_id]() {
auto& settings = GetRoomLayerSettings(room_id);
settings.bg2_visible = !settings.bg2_visible;
},
"2"
});
// Add re-render option
canvas_.AddContextMenuItem({
ICON_MD_REFRESH " Re-render Room",
[&room]() {
room.RenderRoomGraphics();
},
"Ctrl+R"
});
}
canvas_.DrawContextMenu();
if (rooms_ && rom_->is_loaded()) {

View File

@@ -22,8 +22,7 @@ void DungeonEditorV2::Initialize(gfx::IRenderer* renderer, Rom* rom) {
// Don't initialize emulator preview yet - ROM might not be loaded
// Will be initialized in Load() instead
// Setup docking class for room windows
room_window_class_.ClassId = ImGui::GetID("DungeonRoomClass");
// Setup docking class for room windows (ImGui::GetID will be called in Update when ImGui is ready)
room_window_class_.DockingAllowUnclassed = true; // Room windows can dock with anything
room_window_class_.DockingAlwaysTabBar = true; // Always show tabs when multiple rooms
@@ -158,6 +157,11 @@ absl::Status DungeonEditorV2::Load() {
}
absl::Status DungeonEditorV2::Update() {
// Initialize docking class ID on first Update (when ImGui is ready)
if (room_window_class_.ClassId == 0) {
room_window_class_.ClassId = ImGui::GetID("DungeonRoomClass");
}
if (!is_loaded_) {
// CARD-BASED EDITOR: Create a minimal loading card
gui::EditorCard loading_card("Dungeon Editor Loading", ICON_MD_CASTLE);