GUI: allow cursor movement when stepping
This commit is contained in:
parent
55e085b148
commit
11516d7923
|
@ -86,6 +86,7 @@ void FurnaceGUI::drawEditControls() {
|
|||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne")) {
|
||||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=true;
|
||||
}
|
||||
}
|
||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_EDIT_CONTROLS;
|
||||
|
@ -105,6 +106,7 @@ void FurnaceGUI::drawEditControls() {
|
|||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne")) {
|
||||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=true;
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
|
@ -182,6 +184,7 @@ void FurnaceGUI::drawEditControls() {
|
|||
}
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne")) {
|
||||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=true;
|
||||
}
|
||||
|
||||
bool repeatPattern=e->getRepeatPattern();
|
||||
|
@ -272,6 +275,7 @@ void FurnaceGUI::drawEditControls() {
|
|||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne")) {
|
||||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=true;
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
|
|
|
@ -3629,6 +3629,7 @@ FurnaceGUI::FurnaceGUI():
|
|||
fadeMode(false),
|
||||
randomMode(false),
|
||||
haveHitBounds(false),
|
||||
pendingStepUpdate(false),
|
||||
oldOrdersLen(0),
|
||||
sampleZoom(1.0),
|
||||
prevSampleZoom(1.0),
|
||||
|
|
|
@ -1011,7 +1011,7 @@ class FurnaceGUI {
|
|||
int dummyRows, demandX;
|
||||
int transposeAmount, randomizeMin, randomizeMax, fadeMin, fadeMax;
|
||||
float scaleMax;
|
||||
bool fadeMode, randomMode, haveHitBounds;
|
||||
bool fadeMode, randomMode, haveHitBounds, pendingStepUpdate;
|
||||
|
||||
int oldOrdersLen;
|
||||
DivOrders oldOrders;
|
||||
|
|
|
@ -380,7 +380,7 @@ void FurnaceGUI::drawPattern() {
|
|||
bool inhibitMenu=false;
|
||||
float scrollX=0;
|
||||
|
||||
if (e->isPlaying() && followPattern) cursor.y=oldRow;
|
||||
if (e->isPlaying() && followPattern && (!e->isStepping() || pendingStepUpdate)) cursor.y=oldRow+((pendingStepUpdate)?1:0);
|
||||
demandX=0;
|
||||
sel1=selStart;
|
||||
sel2=selEnd;
|
||||
|
@ -429,7 +429,8 @@ void FurnaceGUI::drawPattern() {
|
|||
char chanID[2048];
|
||||
float lineHeight=(ImGui::GetTextLineHeight()+2*dpiScale);
|
||||
int curRow=e->getRow();
|
||||
if (e->isPlaying() && followPattern) updateScroll(curRow);
|
||||
if (e->isPlaying() && followPattern && (!e->isStepping() || pendingStepUpdate)) updateScroll(curRow);
|
||||
pendingStepUpdate=false;
|
||||
if (nextScroll>-0.5f) {
|
||||
ImGui::SetScrollY(nextScroll);
|
||||
nextScroll=-1.0f;
|
||||
|
|
Loading…
Reference in New Issue