feat: Enhance DungeonCanvasViewer with Object Outline Filters and Context Menu Improvements

- Added a sub-menu for toggling visibility of object outlines based on type and layer, allowing for more granular control over displayed objects in the dungeon canvas.
- Implemented checkboxes for filtering object outlines by type (Type 1, Type 2, Type 3) and layer (Layer 0, Layer 1, Layer 2) in the debug menu.
- Updated the drawing logic to respect the new filtering options, ensuring only the selected objects are rendered on the canvas.
- Improved the visibility of object ID labels by making them smaller and less obtrusive, enhancing the overall clarity of the canvas display.
This commit is contained in:
scawful
2025-10-10 01:11:39 -04:00
parent 9f0b503ada
commit 6f3c9ba81b
6 changed files with 148 additions and 36 deletions

View File

@@ -554,6 +554,15 @@ void Canvas::DrawContextMenu() {
modals_->Render();
}
// CRITICAL: Render custom context menu items AFTER enhanced menu
// Don't return early - we need to show custom items too!
if (!context_menu_items_.empty() && ImGui::BeginPopupContextItem(context_id_.c_str())) {
for (const auto& item : context_menu_items_) {
DrawContextMenuItem(item);
}
ImGui::EndPopup();
}
return;
}