diff --git a/src/gui/insEdit.cpp b/src/gui/insEdit.cpp index 48b72b72f..8ff7735d8 100644 --- a/src/gui/insEdit.cpp +++ b/src/gui/insEdit.cpp @@ -3537,7 +3537,17 @@ void FurnaceGUI::drawInsEdit() { } } - if (i==0) sliderHeight=(ImGui::GetContentRegionAvail().y/opCount)-ImGui::GetStyle().ItemSpacing.y; + if (i==0) { + sliderHeight=(ImGui::GetContentRegionAvail().y/opCount)-ImGui::GetStyle().ItemSpacing.y; + float sliderMinHeightOPL=ImGui::GetFrameHeight()*4.0+ImGui::GetStyle().ItemSpacing.y*3.0; + float sliderMinHeightESFM=ImGui::GetFrameHeight()*5.0+ImGui::GetStyle().ItemSpacing.y*4.0; + if ((ins->type==DIV_INS_OPL || ins->type==DIV_INS_OPL_DRUMS || ins->type==DIV_INS_OPLL) && sliderHeighttype==DIV_INS_ESFM && sliderHeighttype==DIV_INS_ESFM) { ImGui::TableNextColumn(); CENTER_VSLIDER; - P(CWVSliderScalar("##CT",ImVec2(20.0f*dpiScale,sliderHeight),ImGuiDataType_S8,&opE.ct,&_MINUS_TWELVE,&_TWELVE)); rightClickable + P(CWVSliderScalar("##CT",ImVec2(20.0f*dpiScale,sliderHeight),ImGuiDataType_S8,&opE.ct,&_MINUS_TWENTY_FOUR,&_TWENTY_FOUR)); rightClickable } if (ins->type==DIV_INS_FM || ins->type==DIV_INS_OPZ || ins->type==DIV_INS_OPM) { @@ -3763,21 +3773,26 @@ void FurnaceGUI::drawInsEdit() { bool amOn=op.am; bool leftOn=opE.left; bool rightOn=opE.right; + ImGui::SetCursorPosY(ImGui::GetCursorPosY()+0.5*(sliderHeight-ImGui::GetFrameHeight()*5.0-ImGui::GetStyle().ItemSpacing.y*4.0)); if (ImGui::BeginTable("panCheckboxes",2,ImGuiTableFlags_SizingStretchSame)) { ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthStretch,0.0); ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthStretch,0.0); + float yCoordBeforeTablePadding=ImGui::GetCursorPosY(); ImGui::TableNextRow(); ImGui::TableNextColumn(); + ImGui::SetCursorPosY(yCoordBeforeTablePadding); if (ImGui::Checkbox(ESFM_SHORT_NAME(ESFM_LEFT),&leftOn)) { PARAMETER opE.left=leftOn; } ImGui::TableNextColumn(); + ImGui::SetCursorPosY(yCoordBeforeTablePadding); if (ImGui::Checkbox(ESFM_SHORT_NAME(ESFM_RIGHT),&rightOn)) { PARAMETER opE.right=rightOn; } ImGui::EndTable(); } + ImGui::SetCursorPosY(ImGui::GetCursorPosY()-0.5*ImGui::GetStyle().ItemSpacing.y); if (ImGui::Checkbox(FM_NAME(FM_AM),&amOn)) { PARAMETER op.am=amOn; } @@ -4299,7 +4314,7 @@ void FurnaceGUI::drawInsEdit() { ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); snprintf(tempID,1024,"%s: %%d",ESFM_NAME(ESFM_CT)); - P(CWSliderScalar("##CT",ImGuiDataType_S8,&opE.ct,&_MINUS_TWELVE,&_TWELVE,tempID)); rightClickable + P(CWSliderScalar("##CT",ImGuiDataType_S8,&opE.ct,&_MINUS_TWENTY_FOUR,&_TWENTY_FOUR,tempID)); rightClickable ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); snprintf(tempID,1024,"%s: %%d",ESFM_NAME(ESFM_DT)); @@ -4834,7 +4849,7 @@ void FurnaceGUI::drawInsEdit() { ImGui::TableNextRow(); ImGui::TableNextColumn(); ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); - P(CWSliderScalar("##CT",ImGuiDataType_S8,&opE.ct,&_MINUS_TWELVE,&_TWELVE)); rightClickable + P(CWSliderScalar("##CT",ImGuiDataType_S8,&opE.ct,&_MINUS_TWENTY_FOUR,&_TWENTY_FOUR)); rightClickable ImGui::TableNextColumn(); ImGui::Text("%s",ESFM_NAME(ESFM_CT)); @@ -4893,7 +4908,7 @@ void FurnaceGUI::drawInsEdit() { op.ksr=ksrOn; } } - + if (ins->type==DIV_INS_ESFM) { bool leftOn=opE.left; bool rightOn=opE.right; diff --git a/src/gui/intConst.cpp b/src/gui/intConst.cpp index cf0140e23..da5c6065e 100644 --- a/src/gui/intConst.cpp +++ b/src/gui/intConst.cpp @@ -24,9 +24,9 @@ const int _ONE=1; const int _THREE=3; const int _SEVEN=7; const int _TEN=10; -const int _TWELVE=12; const int _FIFTEEN=15; const int _SIXTEEN=16; +const int _TWENTY_FOUR=24; const int _THIRTY_ONE=31; const int _SIXTY_FOUR=64; const int _ONE_HUNDRED=100; @@ -36,6 +36,6 @@ const int _FIVE_HUNDRED_ELEVEN=511; const int _TWO_THOUSAND_FORTY_SEVEN=2047; const int _FOUR_THOUSAND_NINETY_FIVE=4095; const int _SIXTY_FIVE_THOUSAND_FIVE_HUNDRED_THIRTY_FIVE=65535; -const int _MINUS_TWELVE=-12; +const int _MINUS_TWENTY_FOUR=-24; const int _MINUS_ONE_HUNDRED_TWENTY_SEVEN=-127; const int _MINUS_ONE_HUNDRED_TWENTY_EIGHT=-128; diff --git a/src/gui/intConst.h b/src/gui/intConst.h index 18c4ae556..7acbbcf6b 100644 --- a/src/gui/intConst.h +++ b/src/gui/intConst.h @@ -26,9 +26,9 @@ extern const int _ONE; extern const int _THREE; extern const int _SEVEN; extern const int _TEN; -extern const int _TWELVE; extern const int _FIFTEEN; extern const int _SIXTEEN; +extern const int _TWENTY_FOUR; extern const int _THIRTY_ONE; extern const int _SIXTY_FOUR; extern const int _ONE_HUNDRED; @@ -38,6 +38,6 @@ extern const int _FIVE_HUNDRED_ELEVEN; extern const int _TWO_THOUSAND_FORTY_SEVEN; extern const int _FOUR_THOUSAND_NINETY_FIVE; extern const int _SIXTY_FIVE_THOUSAND_FIVE_HUNDRED_THIRTY_FIVE; -extern const int _MINUS_TWELVE; +extern const int _MINUS_TWENTY_FOUR; extern const int _MINUS_ONE_HUNDRED_TWENTY_SEVEN; extern const int _MINUS_ONE_HUNDRED_TWENTY_EIGHT;