feat: Allow faster hex editor scrolling by holding down CTRL or SHIFT + CTRL
This commit is contained in:
parent
474862b4af
commit
682aab8b23
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user