mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-02 02:52:40 +00:00
bump ct range to 24; fix bug in modern layout for OPL and ESFM
This commit is contained in:
parent
484b6f4411
commit
84e0ec9dae
3 changed files with 24 additions and 9 deletions
|
@ -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) && sliderHeight<sliderMinHeightOPL) {
|
||||
sliderHeight=sliderMinHeightOPL;
|
||||
}
|
||||
if (ins->type==DIV_INS_ESFM && sliderHeight<sliderMinHeightESFM) {
|
||||
sliderHeight=sliderMinHeightESFM;
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::PushID(fmt::sprintf("op%d",i).c_str());
|
||||
String opNameLabel;
|
||||
|
@ -3681,7 +3691,7 @@ void FurnaceGUI::drawInsEdit() {
|
|||
if (ins->type==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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue