GUI: add option to set amount of cursor follows wh

discussion #1811
This commit is contained in:
tildearrow 2024-03-20 23:07:46 -05:00
parent 94ae06dd6e
commit ad49ff1571
3 changed files with 24 additions and 1 deletions

View file

@ -1179,7 +1179,13 @@ void FurnaceGUI::drawPattern() {
// cursor follows wheel
if (settings.cursorFollowsWheel && (!e->isPlaying() || !followPattern) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows)) {
if (wheelX!=0 || wheelY!=0) {
moveCursor(wheelX,(settings.cursorFollowsWheel==2)?wheelY:-wheelY,false);
int xAmount=wheelX;
int yAmount=(settings.cursorFollowsWheel==2)?wheelY:-wheelY;
if (settings.cursorWheelStep==1) {
xAmount*=MAX(1,editStep);
yAmount*=MAX(1,editStep);
}
moveCursor(xAmount,yAmount,false);
}
}