From 684633aa1ef5d7af4c3139855594b81460e80f2b Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 28 Aug 2023 06:37:13 -0500 Subject: [PATCH] GUI: preview sample button in unified assets issue #1430 --- src/gui/dataList.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gui/dataList.cpp b/src/gui/dataList.cpp index de5f3515d..ab9d341e9 100644 --- a/src/gui/dataList.cpp +++ b/src/gui/dataList.cpp @@ -504,6 +504,18 @@ void FurnaceGUI::drawInsList(bool asChild) { ImGui::SetTooltip("New folder"); } } + if (lastAssetType==2) { + ImGui::SameLine(); + if (ImGui::Button(ICON_FA_VOLUME_UP "##PreviewSampleL")) { + doAction(GUI_ACTION_SAMPLE_LIST_PREVIEW); + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip("Preview (right click to stop)"); + } + if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) { + doAction(GUI_ACTION_SAMPLE_LIST_STOP_PREVIEW); + } + } ImGui::SameLine(); pushDestColor(); if (ImGui::Button(ICON_FA_TIMES "##InsDelete")) {