Merge commit '7688c05bac8c20bc267cae62ec78d55e5d0c493b'

This commit is contained in:
2025-05-31 02:14:15 -05:00
3 changed files with 13 additions and 3 deletions

View File

@ -2,6 +2,7 @@
* Add ability to remember recent projects in config * Add ability to remember recent projects in config
* PaletteEditor: Add RGB key shortcuts for focusing color channels * PaletteEditor: Add RGB key shortcuts for focusing color channels
* PaletteEditor: Add color preview to color editor
# d2025.05.2 # d2025.05.2

View File

@ -307,6 +307,15 @@ void PaletteEditorImGui::drawColorEditor() noexcept {
colorInput("Red", r, inputFocused, FocusCmd::Red); colorInput("Red", r, inputFocused, FocusCmd::Red);
colorInput("Green", g, inputFocused, FocusCmd::Green); colorInput("Green", g, inputFocused, FocusCmd::Green);
colorInput("Blue", b, inputFocused, FocusCmd::Blue); colorInput("Blue", b, inputFocused, FocusCmd::Blue);
// color preview
{
ImGui::PushStyleColor(
ImGuiCol_ChildBg,
color32(color16(r, g, b)) | 0xff'00'00'00);
ImGui::BeginChild("ColorPreview", {0, 25});
ImGui::EndChild();
ImGui::PopStyleColor();
}
if (ig::PushButton("Apply to all pages", {-1, ig::BtnSz.y})) { if (ig::PushButton("Apply to all pages", {-1, ig::BtnSz.y})) {
std::ignore = pushCommand<ApplyColorAllPagesCommand>( std::ignore = pushCommand<ApplyColorAllPagesCommand>(
m_pal, m_page, m_selectedColorRow); m_pal, m_page, m_selectedColorRow);