GUI: fix loop being hard to set

This commit is contained in:
tildearrow 2022-09-30 18:59:56 -05:00
parent 5e4bfe2f11
commit 41c8386485
3 changed files with 18 additions and 2 deletions

View File

@ -5397,6 +5397,7 @@ FurnaceGUI::FurnaceGUI():
editOptsVisible(false),
latchNibble(false),
nonLatchNibble(false),
keepLoopAlive(false),
curWindow(GUI_WINDOW_NOTHING),
nextWindow(GUI_WINDOW_NOTHING),
curWindowLast(GUI_WINDOW_NOTHING),

View File

@ -1366,6 +1366,7 @@ class FurnaceGUI {
SelectionPoint selStart, selEnd, cursor, cursorDrag, dragStart, dragEnd;
bool selecting, selectingFull, dragging, curNibble, orderNibble, followOrders, followPattern, changeAllOrders, mobileUI;
bool collapseWindow, demandScrollX, fancyPattern, wantPatName, firstFrame, tempoView, waveHex, waveSigned, waveGenVisible, lockLayout, editOptsVisible, latchNibble, nonLatchNibble;
bool keepLoopAlive;
FurnaceGUIWindows curWindow, nextWindow, curWindowLast;
float peak[2];
float patChanX[DIV_MAX_CHANS+1];

View File

@ -121,7 +121,8 @@ void FurnaceGUI::drawSampleEdit() {
}
updateSampleTex=true;
}
if (doLoop) {
if (doLoop || keepLoopAlive) {
keepLoopAlive=false;
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::Text("Loop Mode");
@ -153,6 +154,9 @@ void FurnaceGUI::drawSampleEdit() {
}
updateSampleTex=true;
}
if (ImGui::IsItemActive()) {
keepLoopAlive=true;
}
ImGui::TableNextColumn();
ImGui::Text("Loop End");
ImGui::SameLine();
@ -166,6 +170,9 @@ void FurnaceGUI::drawSampleEdit() {
}
updateSampleTex=true;
}
if (ImGui::IsItemActive()) {
keepLoopAlive=true;
}
}
ImGui::EndTable();
}
@ -678,7 +685,8 @@ void FurnaceGUI::drawSampleEdit() {
}
updateSampleTex=true;
}
if (doLoop) {
if (doLoop || keepLoopAlive) {
keepLoopAlive=false;
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::Text("Loop Mode");
@ -711,6 +719,9 @@ void FurnaceGUI::drawSampleEdit() {
}
updateSampleTex=true;
}
if (ImGui::IsItemActive()) {
keepLoopAlive=true;
}
ImGui::TableNextColumn();
ImGui::Text("Loop End");
ImGui::SameLine();
@ -724,6 +735,9 @@ void FurnaceGUI::drawSampleEdit() {
}
updateSampleTex=true;
}
if (ImGui::IsItemActive()) {
keepLoopAlive=true;
}
}
ImGui::EndTable();
}