Added a button into the sample editor to preview the currently edited sample from the selection cursor

This commit is contained in:
ExecThTs 2025-02-03 12:21:43 +01:00 committed by tildearrow
parent 659a16a489
commit df830b46c0

View file

@ -1375,6 +1375,13 @@ void FurnaceGUI::drawSampleEdit() {
ImGui::SetTooltip(_("Preview sample"));
}
sameLineMaybe();
if (ImGui::Button(ICON_FA_PLAY_CIRCLE "##PreviewSampleFromCursor")) {
e->previewSample(curSample, -1, sampleSelStart);
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip(_("Preview sample from cursor"));
}
sameLineMaybe();
if (ImGui::Button(ICON_FA_STOP "##StopSample")) {
e->stopSamplePreview();
}