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

@ -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();
}