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
|
@ -271,9 +271,15 @@ void FurnaceGUI::moveCursor(int x, int y, bool select) {
|
|||
if (cursor.y>=e->curSubSong->patLen) {
|
||||
if (settings.wrapVertical!=0 && !select) {
|
||||
cursor.y=0;
|
||||
if (settings.wrapVertical==2) {
|
||||
if ((!e->isPlaying() || !followPattern) && curOrder<(e->curSubSong->ordersLen-1)) {
|
||||
if (settings.wrapVertical>1) {
|
||||
if (!e->isPlaying() || !followPattern) {
|
||||
if (curOrder<(e->curSubSong->ordersLen-1)) {
|
||||
setOrder(curOrder+1);
|
||||
} else if (settings.wrapVertical==3) {
|
||||
setOrder(0);
|
||||
} else {
|
||||
cursor.y=e->curSubSong->patLen-1;
|
||||
}
|
||||
} else {
|
||||
cursor.y=e->curSubSong->patLen-1;
|
||||
}
|
||||
|
@ -289,9 +295,15 @@ void FurnaceGUI::moveCursor(int x, int y, bool select) {
|
|||
if (cursor.y<0) {
|
||||
if (settings.wrapVertical!=0 && !select) {
|
||||
cursor.y=e->curSubSong->patLen-1;
|
||||
if (settings.wrapVertical==2) {
|
||||
if ((!e->isPlaying() || !followPattern) && curOrder>0) {
|
||||
if (settings.wrapVertical>1) {
|
||||
if (!e->isPlaying() || !followPattern) {
|
||||
if (curOrder>0) {
|
||||
setOrder(curOrder-1);
|
||||
} else if (settings.wrapVertical==3) {
|
||||
setOrder(e->curSubSong->ordersLen-1);
|
||||
} else {
|
||||
cursor.y=0;
|
||||
}
|
||||
} else {
|
||||
cursor.y=0;
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -572,11 +572,6 @@ void FurnaceGUI::drawSettings() {
|
|||
settings.effectDeletionAltersValue=effectDeletionAltersValueB;
|
||||
}
|
||||
|
||||
bool scrollChangesOrderB=settings.scrollChangesOrder;
|
||||
if (ImGui::Checkbox("Change order when scrolling outside of pattern bounds",&scrollChangesOrderB)) {
|
||||
settings.scrollChangesOrder=scrollChangesOrderB;
|
||||
}
|
||||
|
||||
bool stepOnInsertB=settings.stepOnInsert;
|
||||
if (ImGui::Checkbox("Move cursor by edit step on insert (push)",&stepOnInsertB)) {
|
||||
settings.stepOnInsert=stepOnInsertB;
|
||||
|
@ -758,6 +753,21 @@ void FurnaceGUI::drawSettings() {
|
|||
if (ImGui::RadioButton("Yes, and move to next/prev pattern##wrapV2",settings.wrapVertical==2)) {
|
||||
settings.wrapVertical=2;
|
||||
}
|
||||
if (ImGui::RadioButton("Yes, and move to next/prev pattern (wrap around)##wrapV2",settings.wrapVertical==3)) {
|
||||
settings.wrapVertical=3;
|
||||
}
|
||||
|
||||
ImGui::Text("Change order when scrolling outside of pattern bounds:");
|
||||
if (ImGui::RadioButton("No##pscroll0",settings.scrollChangesOrder==0)) {
|
||||
settings.scrollChangesOrder=0;
|
||||
}
|
||||
if (ImGui::RadioButton("Yes##pscroll1",settings.scrollChangesOrder==1)) {
|
||||
settings.scrollChangesOrder=1;
|
||||
}
|
||||
if (ImGui::RadioButton("Yes, and wrap around song##pscroll2",settings.scrollChangesOrder==2)) {
|
||||
settings.scrollChangesOrder=2;
|
||||
}
|
||||
|
||||
|
||||
ImGui::Text("Cursor movement keys behavior:");
|
||||
if (ImGui::RadioButton("Move by one##cmk0",settings.scrollStep==0)) {
|
||||
|
@ -2819,7 +2829,7 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.soloAction,0,2);
|
||||
clampSetting(settings.pullDeleteBehavior,0,1);
|
||||
clampSetting(settings.wrapHorizontal,0,2);
|
||||
clampSetting(settings.wrapVertical,0,2);
|
||||
clampSetting(settings.wrapVertical,0,3);
|
||||
clampSetting(settings.macroView,0,1);
|
||||
clampSetting(settings.fmNames,0,2);
|
||||
clampSetting(settings.allowEditDocking,0,1);
|
||||
|
@ -2863,7 +2873,7 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.insEditColorize,0,1);
|
||||
clampSetting(settings.metroVol,0,200);
|
||||
clampSetting(settings.pushNibble,0,1);
|
||||
clampSetting(settings.scrollChangesOrder,0,1);
|
||||
clampSetting(settings.scrollChangesOrder,0,2);
|
||||
clampSetting(settings.oplStandardWaveNames,0,1);
|
||||
clampSetting(settings.cursorMoveNoScroll,0,1);
|
||||
clampSetting(settings.lowLatency,0,1);
|
||||
|
|
Loading…
Reference in a new issue