[nostalgia/core/studio] Show color names in TileSheetEditor
All checks were successful
Build / build (push) Successful in 2m34s

This commit is contained in:
Gary Talent 2024-05-30 23:12:12 -05:00
parent ababc2a736
commit 7d9f363bfa

View File

@ -471,9 +471,10 @@ void TileSheetEditorImGui::drawPaletteSelector() noexcept {
}
// header
if (ImGui::BeginTable(
"PaletteTable", 3, ImGuiTableFlags_RowBg | ImGuiTableFlags_SizingStretchProp)) {
ImGui::TableSetupColumn("No.", 0, 0.45f);
"PaletteTable", 4, ImGuiTableFlags_RowBg | ImGuiTableFlags_SizingStretchProp)) {
ImGui::TableSetupColumn("Idx", 0, 0.6f);
ImGui::TableSetupColumn("", 0, 0.22f);
ImGui::TableSetupColumn("Name", 0, 3);
ImGui::TableSetupColumn("Color16", 0, 3);
ImGui::TableHeadersRow();
{
@ -494,6 +495,9 @@ void TileSheetEditorImGui::drawPaletteSelector() noexcept {
auto ic = ImGui::GetColorU32(ImVec4(redf(c), greenf(c), bluef(c), 1));
ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, ic);
ImGui::TableNextColumn();
auto const&name = pal.colorInfo[i].name;
ImGui::Text("%s", name.c_str());
ImGui::TableNextColumn();
ImGui::Text("(%02d, %02d, %02d)", red16(c), green16(c), blue16(c));
ImGui::TableNextRow();
ImGui::PopID();