From 8e4e1e93dbbbfc400848f8d956d5884b0417befe Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 30 Sep 2022 19:04:39 -0500 Subject: [PATCH] GUI: BRR warning --- src/gui/sampleEdit.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/gui/sampleEdit.cpp b/src/gui/sampleEdit.cpp index a00c895a1..e067f06ed 100644 --- a/src/gui/sampleEdit.cpp +++ b/src/gui/sampleEdit.cpp @@ -121,6 +121,9 @@ void FurnaceGUI::drawSampleEdit() { } updateSampleTex=true; } + if (ImGui::IsItemHovered() && sample->depth==DIV_SAMPLE_DEPTH_BRR) { + ImGui::SetTooltip("changing the loop in a BRR sample may result in glitches!"); + } if (doLoop || keepLoopAlive) { keepLoopAlive=false; ImGui::TableNextRow(); @@ -157,6 +160,9 @@ void FurnaceGUI::drawSampleEdit() { if (ImGui::IsItemActive()) { keepLoopAlive=true; } + if (ImGui::IsItemHovered() && sample->depth==DIV_SAMPLE_DEPTH_BRR) { + ImGui::SetTooltip("changing the loop in a BRR sample may result in glitches!"); + } ImGui::TableNextColumn(); ImGui::Text("Loop End"); ImGui::SameLine(); @@ -173,6 +179,9 @@ void FurnaceGUI::drawSampleEdit() { if (ImGui::IsItemActive()) { keepLoopAlive=true; } + if (ImGui::IsItemHovered() && sample->depth==DIV_SAMPLE_DEPTH_BRR) { + ImGui::SetTooltip("changing the loop in a BRR sample may result in glitches!"); + } } ImGui::EndTable(); } @@ -685,6 +694,9 @@ void FurnaceGUI::drawSampleEdit() { } updateSampleTex=true; } + if (ImGui::IsItemHovered() && sample->depth==DIV_SAMPLE_DEPTH_BRR) { + ImGui::SetTooltip("changing the loop in a BRR sample may result in glitches!"); + } if (doLoop || keepLoopAlive) { keepLoopAlive=false; ImGui::TableNextRow(); @@ -722,6 +734,9 @@ void FurnaceGUI::drawSampleEdit() { if (ImGui::IsItemActive()) { keepLoopAlive=true; } + if (ImGui::IsItemHovered() && sample->depth==DIV_SAMPLE_DEPTH_BRR) { + ImGui::SetTooltip("changing the loop in a BRR sample may result in glitches!"); + } ImGui::TableNextColumn(); ImGui::Text("Loop End"); ImGui::SameLine(); @@ -738,6 +753,9 @@ void FurnaceGUI::drawSampleEdit() { if (ImGui::IsItemActive()) { keepLoopAlive=true; } + if (ImGui::IsItemHovered() && sample->depth==DIV_SAMPLE_DEPTH_BRR) { + ImGui::SetTooltip("changing the loop in a BRR sample may result in glitches!"); + } } ImGui::EndTable(); }