make GUI hide block/f-num in the pitch control mode
This commit is contained in:
parent
2118fb3fdd
commit
b905671798
|
|
@ -3804,18 +3804,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
CENTER_VSLIDER;
|
CENTER_VSLIDER;
|
||||||
bool egtOn=op.egt;
|
bool egtOn=op.egt;
|
||||||
if(egtOn)
|
if(!egtOn)
|
||||||
{
|
|
||||||
bool susOn=op.sus;
|
|
||||||
if (ImGui::Checkbox("Pitch control",&susOn)) { PARAMETER
|
|
||||||
op.sus=susOn;
|
|
||||||
}
|
|
||||||
if(ImGui::IsItemHovered())
|
|
||||||
{
|
|
||||||
ImGui::SetTooltip(_("Use op's arpeggio and pitch macros control instead of block/f-num macros"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
P(CWVSliderScalar("##FINE",ImVec2(20.0f*dpiScale,sliderHeight),ImGuiDataType_U8,&op.dvb,&_ZERO,&_FIFTEEN)); rightClickable
|
P(CWVSliderScalar("##FINE",ImVec2(20.0f*dpiScale,sliderHeight),ImGuiDataType_U8,&op.dvb,&_ZERO,&_FIFTEEN)); rightClickable
|
||||||
}
|
}
|
||||||
|
|
@ -3847,8 +3836,9 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
bool amOn=op.am;
|
bool amOn=op.am;
|
||||||
if (ins->type==DIV_INS_OPZ) {
|
if (ins->type==DIV_INS_OPZ) {
|
||||||
bool egtOn=op.egt;
|
bool egtOn=op.egt;
|
||||||
|
bool susOn=op.sus;
|
||||||
if (egtOn) {
|
if (egtOn) {
|
||||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY()+0.5*(sliderHeight-ImGui::GetFrameHeight()*4.0-ImGui::GetStyle().ItemSpacing.y*3.0));
|
ImGui::SetCursorPosY(ImGui::GetCursorPosY()+0.5*(sliderHeight-ImGui::GetFrameHeight()*4.0-ImGui::GetStyle().ItemSpacing.y*3.5));
|
||||||
} else {
|
} else {
|
||||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY()+0.5*(sliderHeight-ImGui::GetFrameHeight()*2.0-ImGui::GetStyle().ItemSpacing.y*1.0));
|
ImGui::SetCursorPosY(ImGui::GetCursorPosY()+0.5*(sliderHeight-ImGui::GetFrameHeight()*2.0-ImGui::GetStyle().ItemSpacing.y*1.0));
|
||||||
}
|
}
|
||||||
|
|
@ -3859,6 +3849,18 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
op.egt=egtOn;
|
op.egt=egtOn;
|
||||||
}
|
}
|
||||||
if (egtOn) {
|
if (egtOn) {
|
||||||
|
if (ImGui::Checkbox("Pitch control",&susOn)) { PARAMETER
|
||||||
|
op.sus=susOn;
|
||||||
|
// HACK: reset zoom and scroll in fixed pitch macros so that they draw correctly
|
||||||
|
ins->std.opMacros[i].ssgMacro.vZoom=-1;
|
||||||
|
ins->std.opMacros[i].susMacro.vZoom=-1;
|
||||||
|
}
|
||||||
|
if(ImGui::IsItemHovered())
|
||||||
|
{
|
||||||
|
ImGui::SetTooltip(_("Use op's arpeggio and pitch macros control instead of block/f-num macros"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (egtOn && !susOn) {
|
||||||
int block=op.dt;
|
int block=op.dt;
|
||||||
int freqNum=(op.mult<<4)|(op.dvb&15);
|
int freqNum=(op.mult<<4)|(op.dvb&15);
|
||||||
if (ImGui::InputInt(_("Block"),&block,1,1)) {
|
if (ImGui::InputInt(_("Block"),&block,1,1)) {
|
||||||
|
|
@ -4463,6 +4465,8 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
// params
|
// params
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
if (egtOn) {
|
if (egtOn) {
|
||||||
|
if(!op.sus)
|
||||||
|
{
|
||||||
int block=op.dt;
|
int block=op.dt;
|
||||||
int freqNum=(op.mult<<4)|(op.dvb&15);
|
int freqNum=(op.mult<<4)|(op.dvb&15);
|
||||||
ImGui::Text(_("Block"));
|
ImGui::Text(_("Block"));
|
||||||
|
|
@ -4485,6 +4489,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
op.mult=freqNum>>4;
|
op.mult=freqNum>>4;
|
||||||
op.dvb=freqNum&15;
|
op.dvb=freqNum&15;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||||
snprintf(tempID,1024,"%s: %%d",FM_NAME(FM_MULT));
|
snprintf(tempID,1024,"%s: %%d",FM_NAME(FM_MULT));
|
||||||
|
|
@ -4613,6 +4618,9 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
bool susOn=op.sus;
|
bool susOn=op.sus;
|
||||||
if (ImGui::Checkbox("Pitch control",&susOn)) { PARAMETER
|
if (ImGui::Checkbox("Pitch control",&susOn)) { PARAMETER
|
||||||
op.sus=susOn;
|
op.sus=susOn;
|
||||||
|
// HACK: reset zoom and scroll in fixed pitch macros so that they draw correctly
|
||||||
|
ins->std.opMacros[i].ssgMacro.vZoom=-1;
|
||||||
|
ins->std.opMacros[i].susMacro.vZoom=-1;
|
||||||
}
|
}
|
||||||
if(ImGui::IsItemHovered())
|
if(ImGui::IsItemHovered())
|
||||||
{
|
{
|
||||||
|
|
@ -4929,6 +4937,9 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Checkbox("Pitch control",&susOn)) { PARAMETER
|
if (ImGui::Checkbox("Pitch control",&susOn)) { PARAMETER
|
||||||
op.sus=susOn;
|
op.sus=susOn;
|
||||||
|
// HACK: reset zoom and scroll in fixed pitch macros so that they draw correctly
|
||||||
|
ins->std.opMacros[i].ssgMacro.vZoom=-1;
|
||||||
|
ins->std.opMacros[i].susMacro.vZoom=-1;
|
||||||
}
|
}
|
||||||
if(ImGui::IsItemHovered())
|
if(ImGui::IsItemHovered())
|
||||||
{
|
{
|
||||||
|
|
@ -5053,6 +5064,9 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
|
|
||||||
if (ins->type==DIV_INS_OPZ) {
|
if (ins->type==DIV_INS_OPZ) {
|
||||||
if (op.egt) {
|
if (op.egt) {
|
||||||
|
bool susOn=op.sus;
|
||||||
|
if(!susOn)
|
||||||
|
{
|
||||||
int block=op.dt;
|
int block=op.dt;
|
||||||
int freqNum=(op.mult<<4)|(op.dvb&15);
|
int freqNum=(op.mult<<4)|(op.dvb&15);
|
||||||
|
|
||||||
|
|
@ -5078,6 +5092,7 @@ void FurnaceGUI::insTabFM(DivInstrument* ins) {
|
||||||
} rightClickable
|
} rightClickable
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text(_("FreqNum"));
|
ImGui::Text(_("FreqNum"));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue