GUI: new pattern cursor logic, part 5

fix more bugs
This commit is contained in:
tildearrow 2025-06-29 04:37:52 -05:00
parent 608dc375ea
commit 75dca2f114
2 changed files with 5 additions and 3 deletions

View file

@ -247,7 +247,9 @@ void FurnaceGUI::finishSelection() {
// change order if necessary
if (curOrder!=cursor.order) {
curOrder=cursor.order;
if (!e->isPlaying() || !followPattern) {
setOrder(cursor.order);
}
updateScroll(cursor.y);
}

View file

@ -539,10 +539,10 @@ void FurnaceGUI::drawPattern() {
// wrap around and go to previous/next pattern if we're about to go beyond the view
if (newScroll<0.0f && curOrder>0) {
ImGui::SetScrollY(ImGui::GetScrollMaxY()+newScroll);
curOrder--;
if (!e->isPlaying() || !followPattern) setOrder(curOrder-1);
} else if (newScroll>ImGui::GetScrollMaxY() && curOrder<(e->curSubSong->ordersLen-1)) {
ImGui::SetScrollY(newScroll-ImGui::GetScrollMaxY());
curOrder++;
if (!e->isPlaying() || !followPattern) setOrder(curOrder+1);
} else {
ImGui::SetScrollY(newScroll);
}