GUI: new pattern cursor logic, part 4
fix a couple bugs
This commit is contained in:
parent
9646eb9028
commit
608dc375ea
|
@ -247,7 +247,7 @@ void FurnaceGUI::finishSelection() {
|
||||||
|
|
||||||
// change order if necessary
|
// change order if necessary
|
||||||
if (curOrder!=cursor.order) {
|
if (curOrder!=cursor.order) {
|
||||||
setOrder(cursor.order);
|
curOrder=cursor.order;
|
||||||
updateScroll(cursor.y);
|
updateScroll(cursor.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4407,7 +4407,7 @@ bool FurnaceGUI::loop() {
|
||||||
e->getPlayPos(nextPlayOrder,nextOldRow);
|
e->getPlayPos(nextPlayOrder,nextOldRow);
|
||||||
oldRowChanged=false;
|
oldRowChanged=false;
|
||||||
playOrder=nextPlayOrder;
|
playOrder=nextPlayOrder;
|
||||||
if (followPattern) {
|
if (followPattern && !e->isStepping()) {
|
||||||
curOrder=playOrder;
|
curOrder=playOrder;
|
||||||
}
|
}
|
||||||
if (e->isPlaying()) {
|
if (e->isPlaying()) {
|
||||||
|
|
|
@ -539,21 +539,18 @@ void FurnaceGUI::drawPattern() {
|
||||||
// wrap around and go to previous/next pattern if we're about to go beyond the view
|
// wrap around and go to previous/next pattern if we're about to go beyond the view
|
||||||
if (newScroll<0.0f && curOrder>0) {
|
if (newScroll<0.0f && curOrder>0) {
|
||||||
ImGui::SetScrollY(ImGui::GetScrollMaxY()+newScroll);
|
ImGui::SetScrollY(ImGui::GetScrollMaxY()+newScroll);
|
||||||
setOrder(curOrder-1);
|
curOrder--;
|
||||||
} else if (newScroll>ImGui::GetScrollMaxY() && curOrder<(e->curSubSong->ordersLen-1)) {
|
} else if (newScroll>ImGui::GetScrollMaxY() && curOrder<(e->curSubSong->ordersLen-1)) {
|
||||||
ImGui::SetScrollY(newScroll-ImGui::GetScrollMaxY());
|
ImGui::SetScrollY(newScroll-ImGui::GetScrollMaxY());
|
||||||
setOrder(curOrder+1);
|
curOrder++;
|
||||||
} else {
|
} else {
|
||||||
ImGui::SetScrollY(newScroll);
|
ImGui::SetScrollY(newScroll);
|
||||||
}
|
}
|
||||||
|
|
||||||
// select in empty space
|
// select in empty space
|
||||||
logV("T: %d,%d B: %d,%d",topMostOrder,topMostRow,bottomMostOrder,bottomMostRow);
|
|
||||||
if (nextAddScroll>0.0f) {
|
if (nextAddScroll>0.0f) {
|
||||||
logW("DOWN");
|
|
||||||
updateSelection(selEnd.xCoarse,selEnd.xFine,bottomMostRow,bottomMostOrder);
|
updateSelection(selEnd.xCoarse,selEnd.xFine,bottomMostRow,bottomMostOrder);
|
||||||
} else {
|
} else {
|
||||||
logW("UP");
|
|
||||||
updateSelection(selEnd.xCoarse,selEnd.xFine,topMostRow,topMostOrder);
|
updateSelection(selEnd.xCoarse,selEnd.xFine,topMostRow,topMostOrder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue