1
0
mirror of synced 2025-01-19 01:24:15 +01:00

feat: Allow faster hex editor scrolling by holding down CTRL or SHIFT + CTRL

This commit is contained in:
WerWolv 2024-06-26 19:13:42 +02:00
parent 474862b4af
commit 682aab8b23

View File

@ -187,7 +187,15 @@ namespace hex::ui {
this->drawMinimap(characterSize);
if (ImGui::IsWindowHovered()) {
m_scrollPosition += ImS64(ImGui::GetIO().MouseWheel * -5);
float scrollMultiplier;
if (ImGui::GetIO().KeyCtrl && ImGui::GetIO().KeyShift)
scrollMultiplier = m_visibleRowCount * 10.0F;
else if (ImGui::GetIO().KeyCtrl)
scrollMultiplier = m_visibleRowCount;
else
scrollMultiplier = 5;
m_scrollPosition += ImS64(ImGui::GetIO().MouseWheel * -scrollMultiplier);
}
if (m_scrollPosition < 0)