GUI: options to wrap around song
both for order change on scroll and vertical cursor wrap
This commit is contained in:
parent
9f9b946522
commit
2f0f30f2f4
3 changed files with 44 additions and 14 deletions
|
|
@ -953,7 +953,7 @@ void FurnaceGUI::drawPattern() {
|
|||
|
||||
// overflow changes order
|
||||
// TODO: this is very unreliable and sometimes it can warp you out of the song
|
||||
if (settings.scrollChangesOrder && !e->isPlaying() && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows)) {
|
||||
if (settings.scrollChangesOrder && (!e->isPlaying() || !followPattern) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows)) {
|
||||
if (wheelY!=0) {
|
||||
if (wheelY>0) {
|
||||
if (ImGui::GetScrollY()<=0) {
|
||||
|
|
@ -962,6 +962,10 @@ void FurnaceGUI::drawPattern() {
|
|||
setOrder(curOrder-1);
|
||||
ImGui::SetScrollY(ImGui::GetScrollMaxY());
|
||||
updateScroll(e->curSubSong->patLen);
|
||||
} else if (settings.scrollChangesOrder==2) {
|
||||
setOrder(e->curSubSong->ordersLen-1);
|
||||
ImGui::SetScrollY(ImGui::GetScrollMaxY());
|
||||
updateScroll(e->curSubSong->patLen);
|
||||
}
|
||||
haveHitBounds=false;
|
||||
} else {
|
||||
|
|
@ -977,6 +981,10 @@ void FurnaceGUI::drawPattern() {
|
|||
setOrder(curOrder+1);
|
||||
ImGui::SetScrollY(0);
|
||||
updateScroll(0);
|
||||
} else if (settings.scrollChangesOrder==2) {
|
||||
setOrder(0);
|
||||
ImGui::SetScrollY(0);
|
||||
updateScroll(0);
|
||||
}
|
||||
haveHitBounds=false;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue