[nostalgia/core/studio] Fix PaletteEditor shortcuts to differentiate based on Alt key
This commit is contained in:
parent
e22b25e54c
commit
36c4022b56
@ -253,13 +253,13 @@ void PaletteEditorImGui::drawColorEditor() noexcept {
|
||||
std::ignore = pushCommand<ApplyColorAllPagesCommand>(
|
||||
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<size_t>(9, lastColor);
|
||||
} else for (auto i = 9u; i < 10; --i) {
|
||||
auto const key = static_cast<ImGuiKey>(ImGuiKey_1 + i);
|
||||
if (ImGui::IsKeyPressed(key, false)) {
|
||||
if (ImGui::IsKeyPressed(key)) {
|
||||
m_selectedColorRow = ox::min<size_t>(i, lastColor);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user