[nostalgia/core/studio] Disable PaletteEditor num key shorts when page rename is open
All checks were successful
Build / build (push) Successful in 2m32s

This commit is contained in:
Gary Talent 2024-09-29 23:17:47 -05:00
parent 1e34f91ebd
commit 1f6fefdb68

View File

@ -253,7 +253,7 @@ void PaletteEditorImGui::drawColorEditor() noexcept {
std::ignore = pushCommand<ApplyColorAllPagesCommand>( std::ignore = pushCommand<ApplyColorAllPagesCommand>(
m_pal, m_page, m_selectedColorRow); m_pal, m_page, m_selectedColorRow);
} }
if (!inputFocused) { if (!inputFocused && !m_pageRename.isOpen()) {
auto const lastColor = largestPage(m_pal) - 1; auto const lastColor = largestPage(m_pal) - 1;
if (ImGui::IsKeyPressed(ImGuiKey_0, false)) { if (ImGui::IsKeyPressed(ImGuiKey_0, false)) {
m_selectedColorRow = ox::min<size_t>(9, lastColor); m_selectedColorRow = ox::min<size_t>(9, lastColor);