From c711f4358e6d74a3d44b7838b74a8ac5b682b9c1 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 28 Sep 2024 21:42:11 -0500 Subject: [PATCH] [nostalgia/core/studio] Fix PaletteEditor 0 key shortcut --- .../core/src/studio/paletteeditor/paletteeditor-imgui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 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 4f4adcf7..01193908 100644 --- a/src/nostalgia/modules/core/src/studio/paletteeditor/paletteeditor-imgui.cpp +++ b/src/nostalgia/modules/core/src/studio/paletteeditor/paletteeditor-imgui.cpp @@ -260,8 +260,8 @@ void PaletteEditorImGui::drawColorEditor() noexcept { m_selectedColorRow = i; } } - if (ImGui::GetIO().KeysDown[ImGuiKey_0]) { - m_selectedColorRow = ox::min(9, largestPage(m_pal)); + if (ImGui::IsKeyPressed(ImGuiKey_0, false)) { + m_selectedColorRow = ox::min(9, largestPage(m_pal) - 1); } } auto const newColor = color16(r, g, b, a);