mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 06:53:01 +00:00
GUI: display loop length in checkbox
This commit is contained in:
parent
f0306ca660
commit
ff06ad67bd
1 changed files with 2 additions and 1 deletions
|
@ -434,7 +434,8 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
bool doLoop=(sample->loop);
|
bool doLoop=(sample->loop);
|
||||||
pushWarningColor(!warnLoop.empty());
|
pushWarningColor(!warnLoop.empty());
|
||||||
if (ImGui::Checkbox("Loop",&doLoop)) { MARK_MODIFIED
|
String loopCheckboxName=(doLoop && (sample->loopEnd-sample->loopStart)>0)?fmt::sprintf("Loop (length: %d)##Loop",sample->loopEnd-sample->loopStart):String("Loop");
|
||||||
|
if (ImGui::Checkbox(loopCheckboxName.c_str(),&doLoop)) { MARK_MODIFIED
|
||||||
if (doLoop) {
|
if (doLoop) {
|
||||||
sample->loop=true;
|
sample->loop=true;
|
||||||
if (sample->loopStart<0) {
|
if (sample->loopStart<0) {
|
||||||
|
|
Loading…
Reference in a new issue