From df830b46c01d94d93c84248615c768434c834d31 Mon Sep 17 00:00:00 2001 From: ExecThTs Date: Mon, 3 Feb 2025 12:21:43 +0100 Subject: [PATCH] Added a button into the sample editor to preview the currently edited sample from the selection cursor --- src/gui/sampleEdit.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/sampleEdit.cpp b/src/gui/sampleEdit.cpp index fcc674eb9..54feebfd4 100644 --- a/src/gui/sampleEdit.cpp +++ b/src/gui/sampleEdit.cpp @@ -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(); }