Refactor palette group display in Tile16Editor for improved clarity

- Replaced inline array with a static constant for palette group names, enhancing code readability and maintainability.
- Updated the display logic for the current palette group to utilize the new constant, ensuring consistent output.
This commit is contained in:
scawful
2025-09-27 20:05:10 -04:00
parent 5e45c94e59
commit e958fd139e

View File

@@ -1617,11 +1617,12 @@ void Tile16Editor::DrawPaletteSettings() {
Separator();
Text("Current State:");
static const char* palette_group_names[] = {
"OW Main", "OW Aux", "OW Anim", "Dungeon", "Sprites", "Armor", "Sword"
};
Text("Palette Group: %d (%s)", current_palette_group_,
(current_palette_group_ < 7)
? (const char*[]){"OW Main", "OW Aux", "OW Anim", "Dungeon",
"Sprites", "Armor",
"Sword"}[current_palette_group_]
? palette_group_names[current_palette_group_]
: "Unknown");
Text("Current Palette: %d", current_palette_);