mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 13:05:11 +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();
|
||||
bool doLoop=(sample->loop);
|
||||
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) {
|
||||
sample->loop=true;
|
||||
if (sample->loopStart<0) {
|
||||
|
|
Loading…
Reference in a new issue