[nostalgia/core/studio] Cleanup, make all number keys after num colors jump to last
All checks were successful
Build / build (push) Successful in 2m32s
All checks were successful
Build / build (push) Successful in 2m32s
This commit is contained in:
parent
b90ab27a65
commit
0daf938f76
@ -254,15 +254,16 @@ void PaletteEditorImGui::drawColorEditor() noexcept {
|
||||
m_pal, m_page, m_selectedColorRow);
|
||||
}
|
||||
if (!inputFocused) {
|
||||
for (auto i = 0u; i < ox::min<size_t>(10, largestPage(m_pal)); ++i) {
|
||||
auto const lastColor = largestPage(m_pal) - 1;
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_0, false)) {
|
||||
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)) {
|
||||
m_selectedColorRow = i;
|
||||
m_selectedColorRow = ox::min<size_t>(i, lastColor);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_0, false)) {
|
||||
m_selectedColorRow = ox::min<size_t>(9, largestPage(m_pal) - 1);
|
||||
}
|
||||
}
|
||||
auto const newColor = color16(r, g, b, a);
|
||||
if (c != newColor) {
|
||||
|
Loading…
Reference in New Issue
Block a user