From 36c4022b5685c5ed743c4aa5bf45ebcba07e0b8f Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 1 Oct 2024 22:37:05 -0500 Subject: [PATCH] [nostalgia/core/studio] Fix PaletteEditor shortcuts to differentiate based on Alt key --- .../core/src/studio/paletteeditor/paletteeditor-imgui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nostalgia/modules/core/src/studio/paletteeditor/paletteeditor-imgui.cpp b/src/nostalgia/modules/core/src/studio/paletteeditor/paletteeditor-imgui.cpp index a645014b..ac179f65 100644 --- a/src/nostalgia/modules/core/src/studio/paletteeditor/paletteeditor-imgui.cpp +++ b/src/nostalgia/modules/core/src/studio/paletteeditor/paletteeditor-imgui.cpp @@ -253,13 +253,13 @@ void PaletteEditorImGui::drawColorEditor() noexcept { std::ignore = pushCommand( m_pal, m_page, m_selectedColorRow); } - if (!inputFocused && !m_pageRename.isOpen()) { + if (!inputFocused && !m_pageRename.isOpen() && !ImGui::IsKeyDown(ImGuiKey_ModAlt)) { auto const lastColor = largestPage(m_pal) - 1; - if (ImGui::IsKeyPressed(ImGuiKey_0, false)) { + if (ImGui::IsKeyPressed(ImGuiKey_0)) { m_selectedColorRow = ox::min(9, lastColor); } else for (auto i = 9u; i < 10; --i) { auto const key = static_cast(ImGuiKey_1 + i); - if (ImGui::IsKeyPressed(key, false)) { + if (ImGui::IsKeyPressed(key)) { m_selectedColorRow = ox::min(i, lastColor); break; }