improvements to sysDef and UX changes
- "no undo" in clear option - only display instrument types depending on current systems
This commit is contained in:
parent
24d60507e7
commit
78bdd98e0b
11 changed files with 518 additions and 4 deletions
|
|
@ -175,6 +175,10 @@ const char* n163UpdateBits[8]={
|
|||
"now", "every waveform changed", NULL
|
||||
};
|
||||
|
||||
const char* suControlBits[5]={
|
||||
"ring mod", "low pass", "band pass", "high pass", NULL
|
||||
};
|
||||
|
||||
const char* panBits[3]={
|
||||
"right", "left", NULL
|
||||
};
|
||||
|
|
@ -1386,9 +1390,19 @@ void FurnaceGUI::drawInsEdit() {
|
|||
if (ins->type>=DIV_INS_MAX) ins->type=DIV_INS_FM;
|
||||
int insType=ins->type;
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
/*
|
||||
if (ImGui::Combo("##Type",&insType,insTypes,DIV_INS_MAX,DIV_INS_MAX)) {
|
||||
ins->type=(DivInstrumentType)insType;
|
||||
}
|
||||
*/
|
||||
if (ImGui::BeginCombo("##Type",insTypes[insType])) {
|
||||
for (DivInstrumentType i: e->getPossibleInsTypes()) {
|
||||
if (ImGui::Selectable(insTypes[i],insType==i)) {
|
||||
ins->type=i;
|
||||
}
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
|
@ -2701,7 +2715,7 @@ void FurnaceGUI::drawInsEdit() {
|
|||
if (ins->type==DIV_INS_AMIGA) {
|
||||
volMax=64;
|
||||
}
|
||||
if (ins->type==DIV_INS_FM || ins->type == DIV_INS_MIKEY) {
|
||||
if (ins->type==DIV_INS_FM || ins->type==DIV_INS_MIKEY || ins->type==DIV_INS_SU) {
|
||||
volMax=127;
|
||||
}
|
||||
if (ins->type==DIV_INS_GB) {
|
||||
|
|
@ -2769,6 +2783,9 @@ void FurnaceGUI::drawInsEdit() {
|
|||
dutyLabel="Duty";
|
||||
dutyMax=7;
|
||||
}
|
||||
if (ins->type==DIV_INS_SU) {
|
||||
dutyMax=127;
|
||||
}
|
||||
bool dutyIsRel=(ins->type==DIV_INS_C64 && !ins->c64.dutyIsAbs);
|
||||
|
||||
const char* waveLabel="Waveform";
|
||||
|
|
@ -2783,6 +2800,7 @@ void FurnaceGUI::drawInsEdit() {
|
|||
if (ins->type==DIV_INS_SAA1099) waveMax=2;
|
||||
if (ins->type==DIV_INS_FM || ins->type==DIV_INS_OPL || ins->type==DIV_INS_OPZ) waveMax=0;
|
||||
if (ins->type==DIV_INS_MIKEY) waveMax=0;
|
||||
if (ins->type==DIV_INS_SU) waveMax=7;
|
||||
if (ins->type==DIV_INS_PET) {
|
||||
waveMax=8;
|
||||
bitMode=true;
|
||||
|
|
@ -2818,6 +2836,10 @@ void FurnaceGUI::drawInsEdit() {
|
|||
ex1Max=63;
|
||||
ex2Max=4095;
|
||||
}
|
||||
if (ins->type==DIV_INS_SU) {
|
||||
ex1Max=65535;
|
||||
ex2Max=255;
|
||||
}
|
||||
if (ins->type==DIV_INS_SAA1099) ex1Max=8;
|
||||
|
||||
int panMax=0;
|
||||
|
|
@ -2882,6 +2904,8 @@ void FurnaceGUI::drawInsEdit() {
|
|||
NORMAL_MACRO(ins->std.ex1Macro,0,ex1Max,"ex1","Waveform len.",160,ins->std.ex1Macro.open,false,NULL,false,NULL,0,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[4],0,ex1Max,NULL,false);
|
||||
} else if (ins->type==DIV_INS_FDS) {
|
||||
NORMAL_MACRO(ins->std.ex1Macro,0,ex1Max,"ex1","Mod Depth",160,ins->std.ex1Macro.open,false,NULL,false,NULL,0,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[4],0,ex1Max,NULL,false);
|
||||
} else if (ins->type==DIV_INS_SU) {
|
||||
NORMAL_MACRO(ins->std.ex1Macro,0,ex1Max,"ex1","Cutoff",160,ins->std.ex1Macro.open,false,NULL,false,NULL,0,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[4],0,ex1Max,NULL,false);
|
||||
} else {
|
||||
NORMAL_MACRO(ins->std.ex1Macro,0,ex1Max,"ex1","Duty",160,ins->std.ex1Macro.open,false,NULL,false,NULL,0,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[4],0,ex1Max,NULL,false);
|
||||
}
|
||||
|
|
@ -2893,6 +2917,8 @@ void FurnaceGUI::drawInsEdit() {
|
|||
NORMAL_MACRO(ins->std.ex2Macro,0,ex2Max,"ex2","Waveform update",64,ins->std.ex2Macro.open,true,n163UpdateBits,false,NULL,0,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[5],0,ex2Max,NULL,false);
|
||||
} else if (ins->type==DIV_INS_FDS) {
|
||||
NORMAL_MACRO(ins->std.ex2Macro,0,ex2Max,"ex2","Mod Speed",160,ins->std.ex2Macro.open,false,NULL,false,NULL,0,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[5],0,ex2Max,NULL,false);
|
||||
} else if (ins->type==DIV_INS_SU) {
|
||||
NORMAL_MACRO(ins->std.ex2Macro,0,ex2Max,"ex2","Resonance",160,ins->std.ex2Macro.open,false,NULL,false,NULL,0,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[5],0,ex2Max,NULL,false);
|
||||
} else {
|
||||
NORMAL_MACRO(ins->std.ex2Macro,0,ex2Max,"ex2","Envelope",ex2Bit?64:160,ins->std.ex2Macro.open,ex2Bit,ayEnvBits,false,NULL,0,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[5],0,ex2Max,NULL,false);
|
||||
}
|
||||
|
|
@ -2918,6 +2944,9 @@ void FurnaceGUI::drawInsEdit() {
|
|||
if (ins->type==DIV_INS_FDS) {
|
||||
NORMAL_MACRO(ins->std.ex3Macro,0,127,"ex3","Mod Position",160,ins->std.ex3Macro.open,false,NULL,false,NULL,0,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[6],0,2,NULL,false);
|
||||
}
|
||||
if (ins->type==DIV_INS_SU) {
|
||||
NORMAL_MACRO(ins->std.ex3Macro,0,4,"ex3","Control",64,ins->std.ex3Macro.open,true,suControlBits,false,NULL,0,0,0,0,false,0,macroDummyMode,uiColors[GUI_COLOR_MACRO_OTHER],mmlString[6],0,4,NULL,false);
|
||||
}
|
||||
|
||||
MACRO_END;
|
||||
} else { // classic view (TODO: possibly remove)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue