GUI: add "set loop" to sample editor

This commit is contained in:
tildearrow 2022-05-28 18:37:49 -05:00
parent f8796f8ec9
commit 5de31f510c
6 changed files with 23 additions and 2 deletions

View file

@ -1231,6 +1231,22 @@ void FurnaceGUI::doAction(int what) {
}
break;
}
case GUI_ACTION_SAMPLE_SET_LOOP: {
if (curSample<0 || curSample>=(int)e->song.sample.size()) break;
DivSample* sample=e->song.sample[curSample];
sample->prepareUndo(true);
e->lockEngine([this,sample]() {
SAMPLE_OP_BEGIN;
sample->trim(0,end);
sample->loopStart=start;
updateSampleTex=true;
e->renderSamples();
});
MARK_MODIFIED;
break;
}
case GUI_ACTION_ORDERS_UP:
if (curOrder>0) {