diff --git a/src/app/editor/modules/palette_editor.cc b/src/app/editor/modules/palette_editor.cc index 586ece7e..c6b28919 100644 --- a/src/app/editor/modules/palette_editor.cc +++ b/src/app/editor/modules/palette_editor.cc @@ -95,10 +95,8 @@ absl::Status PaletteEditor::Update() { TableHeadersRow(); TableNextRow(); TableNextColumn(); - if (gui::SnesColorEdit4("Color Picker", ¤t_color_, - ImGuiColorEditFlags_NoAlpha)) { - // TODO: Implement new update color function - } + gui::SnesColorEdit4("Current Color Picker", ¤t_color_, + ImGuiColorEditFlags_NoAlpha); Separator(); DisplayCategoryTable(); @@ -110,7 +108,7 @@ absl::Status PaletteEditor::Update() { Separator(); static std::string palette_notes = "Notes about the palette"; ImGui::InputTextMultiline("Notes", palette_notes.data(), 1024, - ImVec2(-1, ImGui::GetTextLineHeight() * 16), + ImVec2(-1, ImGui::GetTextLineHeight() * 4), ImGuiInputTextFlags_AllowTabInput); EndTable(); @@ -224,7 +222,6 @@ absl::Status PaletteEditor::DrawPaletteGroup(int category) { if (gui::SnesColorButton(popup_id, *palette->mutable_color(n), palette_button_flags)) { ASSIGN_OR_RETURN(current_color_, palette->GetColor(n)); - // EditColorInPalette(*palette, n); } if (BeginPopupContextItem(popup_id.c_str())) { @@ -265,7 +262,7 @@ absl::Status PaletteEditor::HandleColorPopup(gfx::SnesPalette& palette, int i, if (Selectable(buf)) SetClipboardText(buf); // SNES Format - CustomFormatString(buf, IM_ARRAYSIZE(buf), "0x%04X", + CustomFormatString(buf, IM_ARRAYSIZE(buf), "$%04X", ConvertRGBtoSNES(ImVec4(col[0], col[1], col[2], 1.0f))); if (Selectable(buf)) SetClipboardText(buf); diff --git a/src/app/gui/color.cc b/src/app/gui/color.cc index 34ae470a..49ea6581 100644 --- a/src/app/gui/color.cc +++ b/src/app/gui/color.cc @@ -25,8 +25,7 @@ ImVec4 ConvertSNESColorToImVec4(const SnesColor& color) { IMGUI_API bool SnesColorButton(absl::string_view id, SnesColor& color, ImGuiColorEditFlags flags, const ImVec2& size_arg) { - // Convert the SNES color values to ImGui color values (normalized to 0-1 - // range) + // Convert the SNES color values to ImGui color values ImVec4 displayColor = ConvertSNESColorToImVec4(color); // Call the original ImGui::ColorButton with the converted color