From 5fcf42267a917c6539e837756702929271faa13c Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 11 Nov 2024 03:57:23 -0500 Subject: [PATCH] GUI: warn OPL snare mult issue #2232 --- src/gui/insEdit.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index 007ff0e6d..a79bbb9c1 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -4450,8 +4450,15 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) { } ImGui::TableNextColumn(); + pushWarningColor(ins->type==DIV_INS_OPL_DRUMS && i==0); CENTER_VSLIDER; P(CWVSliderScalar("##MULT",ImVec2(20.0f*dpiScale,sliderHeight),ImGuiDataType_U8,&op.mult,&_ZERO,&_FIFTEEN)); rightClickable + if (ins->type==DIV_INS_OPL_DRUMS && i==0) { + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip("%s",_("Snare's multiplier is determined by HiHat's.")); + } + } + popWarningColor(); if (ins->type==DIV_INS_OPZ) { ImGui::TableNextColumn(); @@ -5096,9 +5103,16 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) { ImGui::EndTable(); } + pushWarningColor(ins->type==DIV_INS_OPL_DRUMS && i==0); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); snprintf(tempID,1024,"%s: %%d",FM_NAME(FM_MULT)); P(CWSliderScalar("##MULT",ImGuiDataType_U8,&op.mult,&_ZERO,&_FIFTEEN,tempID)); rightClickable + if (ins->type==DIV_INS_OPL_DRUMS && i==0) { + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip("%s",_("Snare's multiplier is determined by HiHat's.")); + } + } + popWarningColor(); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); snprintf(tempID,1024,"%s: %%d",FM_NAME(FM_KSL)); @@ -5773,8 +5787,15 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) { } else { ImGui::TableNextRow(); ImGui::TableNextColumn(); + pushWarningColor(ins->type==DIV_INS_OPL_DRUMS && i==0); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); P(CWSliderScalar(FM_NAME(FM_MULT),ImGuiDataType_U8,&op.mult,&_ZERO,&_FIFTEEN)); rightClickable + if (ins->type==DIV_INS_OPL_DRUMS && i==0) { + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip("%s",_("Snare's multiplier is determined by HiHat's.")); + } + } + popWarningColor(); ImGui::TableNextColumn(); ImGui::Text("%s",FM_NAME(FM_MULT)); }