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

@@ -323,9 +323,14 @@ absl::StatusOr<PaletteGroup> CreatePaletteGroupFromLargePalette(
PaletteGroup palette_group;
for (int i = 0; i < palette.size(); i += num_colors) {
SnesPalette new_palette;
if (i + num_colors < palette.size()) {
if (i + num_colors <= palette.size()) {
for (int j = 0; j < num_colors; j++) {
new_palette.AddColor(palette[i + j]);
auto color = palette[i + j];
// Ensure first color of each sub-palette (index 0) is transparent
if (j == 0) {
color.set_transparent(true);
}
new_palette.AddColor(color);
}
}
palette_group.AddPalette(new_palette);