diff --git a/src/nostalgia/core/studio/tilesheeteditor-imgui.cpp b/src/nostalgia/core/studio/tilesheeteditor-imgui.cpp index 94efdd2d..e5caaf6d 100644 --- a/src/nostalgia/core/studio/tilesheeteditor-imgui.cpp +++ b/src/nostalgia/core/studio/tilesheeteditor-imgui.cpp @@ -108,8 +108,9 @@ void TileSheetEditorImGui::drawTileSheet(const geo::Vec2 &fbSize) noexcept { void TileSheetEditorImGui::drawPalettePicker() noexcept { // header - if (ImGui::BeginTable("PaletteTable", 2, ImGuiTableFlags_RowBg)) { - ImGui::TableSetupColumn("No.", 0, 0.35); + if (ImGui::BeginTable("PaletteTable", 3, ImGuiTableFlags_RowBg)) { + ImGui::TableSetupColumn("No.", 0, 0.45); + ImGui::TableSetupColumn("", 0, 0.22); ImGui::TableSetupColumn("Color16", 0, 3); ImGui::TableHeadersRow(); for (auto i = 0u; auto c: m_tileSheetEditor.pal().colors) { @@ -123,6 +124,9 @@ void TileSheetEditorImGui::drawPalettePicker() noexcept { } // Column: color RGB ImGui::TableNextColumn(); + auto ic = ImGui::GetColorU32(ImVec4(redf(c), greenf(c), bluef(c), 1)); + ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg, ic); + ImGui::TableNextColumn(); ImGui::Text("(%02d, %02d, %02d)", red16(c), green16(c), blue16(c)); ImGui::TableNextRow(); ImGui::PopID(); @@ -132,4 +136,4 @@ void TileSheetEditorImGui::drawPalettePicker() noexcept { } } -} +} \ No newline at end of file