GUI: add setting to change position of SL slider
This commit is contained in:
parent
f7d7b00e93
commit
09b5dd556e
|
@ -623,6 +623,7 @@ class FurnaceGUI {
|
|||
int roundedMenus;
|
||||
int loadJapanese;
|
||||
int fmLayout;
|
||||
int susPosition;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
String patFontPath;
|
||||
|
@ -674,6 +675,7 @@ class FurnaceGUI {
|
|||
roundedMenus(0),
|
||||
loadJapanese(0),
|
||||
fmLayout(0),
|
||||
susPosition(0),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
patFontPath(""),
|
||||
|
|
|
@ -1212,9 +1212,11 @@ void FurnaceGUI::drawInsEdit() {
|
|||
ImGui::TableNextColumn();
|
||||
CENTER_TEXT(FM_SHORT_NAME(FM_DR));
|
||||
ImGui::TextUnformatted(FM_SHORT_NAME(FM_DR));
|
||||
ImGui::TableNextColumn();
|
||||
CENTER_TEXT(FM_SHORT_NAME(FM_SL));
|
||||
ImGui::TextUnformatted(FM_SHORT_NAME(FM_SL));
|
||||
if (settings.susPosition==0) {
|
||||
ImGui::TableNextColumn();
|
||||
CENTER_TEXT(FM_SHORT_NAME(FM_SL));
|
||||
ImGui::TextUnformatted(FM_SHORT_NAME(FM_SL));
|
||||
}
|
||||
if (ins->type==DIV_INS_FM || ins->type==DIV_INS_OPZ) {
|
||||
ImGui::TableNextColumn();
|
||||
CENTER_TEXT(FM_SHORT_NAME(FM_D2R));
|
||||
|
@ -1223,6 +1225,11 @@ void FurnaceGUI::drawInsEdit() {
|
|||
ImGui::TableNextColumn();
|
||||
CENTER_TEXT(FM_SHORT_NAME(FM_RR));
|
||||
ImGui::TextUnformatted(FM_SHORT_NAME(FM_RR));
|
||||
if (settings.susPosition==1) {
|
||||
ImGui::TableNextColumn();
|
||||
CENTER_TEXT(FM_SHORT_NAME(FM_SL));
|
||||
ImGui::TextUnformatted(FM_SHORT_NAME(FM_SL));
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TableNextColumn();
|
||||
CENTER_TEXT(FM_SHORT_NAME(FM_TL));
|
||||
|
@ -1303,10 +1310,12 @@ void FurnaceGUI::drawInsEdit() {
|
|||
CENTER_VSLIDER;
|
||||
P(ImGui::VSliderScalar("##DR",ImVec2(20.0f*dpiScale,sliderHeight),ImGuiDataType_U8,&op.dr,&_ZERO,&maxArDr));
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
op.sl&=15;
|
||||
CENTER_VSLIDER;
|
||||
P(ImGui::VSliderScalar("##SL",ImVec2(20.0f*dpiScale,sliderHeight),ImGuiDataType_U8,&op.sl,&_FIFTEEN,&_ZERO));
|
||||
if (settings.susPosition==0) {
|
||||
ImGui::TableNextColumn();
|
||||
op.sl&=15;
|
||||
CENTER_VSLIDER;
|
||||
P(ImGui::VSliderScalar("##SL",ImVec2(20.0f*dpiScale,sliderHeight),ImGuiDataType_U8,&op.sl,&_FIFTEEN,&_ZERO));
|
||||
}
|
||||
|
||||
if (ins->type==DIV_INS_FM || ins->type==DIV_INS_OPZ) {
|
||||
ImGui::TableNextColumn();
|
||||
|
@ -1320,6 +1329,13 @@ void FurnaceGUI::drawInsEdit() {
|
|||
CENTER_VSLIDER;
|
||||
P(ImGui::VSliderScalar("##RR",ImVec2(20.0f*dpiScale,sliderHeight),ImGuiDataType_U8,&op.rr,&_ZERO,&_FIFTEEN));
|
||||
|
||||
if (settings.susPosition==1) {
|
||||
ImGui::TableNextColumn();
|
||||
op.sl&=15;
|
||||
CENTER_VSLIDER;
|
||||
P(ImGui::VSliderScalar("##SL",ImVec2(20.0f*dpiScale,sliderHeight),ImGuiDataType_U8,&op.sl,&_FIFTEEN,&_ZERO));
|
||||
}
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Dummy(ImVec2(4.0f*dpiScale,2.0f*dpiScale));
|
||||
|
||||
|
@ -1493,12 +1509,14 @@ void FurnaceGUI::drawInsEdit() {
|
|||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%s",FM_NAME(FM_DR));
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
P(ImGui::SliderScalar("##SL",ImGuiDataType_U8,&op.sl,&_FIFTEEN,&_ZERO)); rightClickable
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%s",FM_NAME(FM_SL));
|
||||
if (settings.susPosition==0) {
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
P(ImGui::SliderScalar("##SL",ImGuiDataType_U8,&op.sl,&_FIFTEEN,&_ZERO)); rightClickable
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%s",FM_NAME(FM_SL));
|
||||
}
|
||||
|
||||
if (ins->type==DIV_INS_FM || ins->type==DIV_INS_OPZ) {
|
||||
ImGui::TableNextRow();
|
||||
|
@ -1516,6 +1534,15 @@ void FurnaceGUI::drawInsEdit() {
|
|||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%s",FM_NAME(FM_RR));
|
||||
|
||||
if (settings.susPosition==1) {
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
P(ImGui::SliderScalar("##SL",ImGuiDataType_U8,&op.sl,&_FIFTEEN,&_ZERO)); rightClickable
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%s",FM_NAME(FM_SL));
|
||||
}
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
|
|
|
@ -433,6 +433,14 @@ void FurnaceGUI::drawSettings() {
|
|||
settings.fmLayout=3;
|
||||
}
|
||||
|
||||
ImGui::Text("Position of Sustain in FM editor:");
|
||||
if (ImGui::RadioButton("Between Decay and Sustain Rate##susp0",settings.susPosition==0)) {
|
||||
settings.susPosition=0;
|
||||
}
|
||||
if (ImGui::RadioButton("After Release Rate##susp1",settings.susPosition==1)) {
|
||||
settings.susPosition=1;
|
||||
}
|
||||
|
||||
bool macroViewB=settings.macroView;
|
||||
if (ImGui::Checkbox("Classic macro view (standard macros only; deprecated!)",¯oViewB)) {
|
||||
settings.macroView=macroViewB;
|
||||
|
@ -1005,6 +1013,7 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.roundedMenus=e->getConfInt("roundedMenus",0);
|
||||
settings.loadJapanese=e->getConfInt("loadJapanese",0);
|
||||
settings.fmLayout=e->getConfInt("fmLayout",0);
|
||||
settings.susPosition=e->getConfInt("susPosition",0);
|
||||
|
||||
clampSetting(settings.mainFontSize,2,96);
|
||||
clampSetting(settings.patFontSize,2,96);
|
||||
|
@ -1050,6 +1059,7 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.roundedMenus,0,1);
|
||||
clampSetting(settings.loadJapanese,0,1);
|
||||
clampSetting(settings.fmLayout,0,3);
|
||||
clampSetting(settings.susPosition,0,1);
|
||||
|
||||
// keybinds
|
||||
LOAD_KEYBIND(GUI_ACTION_OPEN,FURKMOD_CMD|SDLK_o);
|
||||
|
@ -1285,6 +1295,7 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("roundedMenus",settings.roundedMenus);
|
||||
e->setConf("loadJapanese",settings.loadJapanese);
|
||||
e->setConf("fmLayout",settings.fmLayout);
|
||||
e->setConf("susPosition",settings.susPosition);
|
||||
|
||||
PUT_UI_COLOR(GUI_COLOR_BACKGROUND);
|
||||
PUT_UI_COLOR(GUI_COLOR_FRAME_BACKGROUND);
|
||||
|
|
Loading…
Reference in New Issue