GUI: add option to show ins type menu when adding
This commit is contained in:
parent
3af2f8d2a4
commit
cc8b5d28a8
|
@ -609,6 +609,14 @@ void FurnaceGUI::doAction(int what) {
|
|||
break;
|
||||
|
||||
case GUI_ACTION_INS_LIST_ADD:
|
||||
if (settings.insTypeMenu) {
|
||||
makeInsTypeList=e->getPossibleInsTypes();
|
||||
if (makeInsTypeList.size()>1) {
|
||||
displayInsTypeList=true;
|
||||
displayInsTypeListMakeInsSample=-1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
curIns=e->addInstrument(cursor.xCoarse);
|
||||
if (curIns==-1) {
|
||||
showError("too many instruments!");
|
||||
|
|
|
@ -1548,6 +1548,7 @@ class FurnaceGUI {
|
|||
int removeInsOff;
|
||||
int removeVolOff;
|
||||
int playOnLoad;
|
||||
int insTypeMenu;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
String headFontPath;
|
||||
|
@ -1710,6 +1711,7 @@ class FurnaceGUI {
|
|||
removeInsOff(0),
|
||||
removeVolOff(0),
|
||||
playOnLoad(0),
|
||||
insTypeMenu(1),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
headFontPath(""),
|
||||
|
|
|
@ -2282,6 +2282,11 @@ void FurnaceGUI::drawSettings() {
|
|||
settings.insEditColorize=insEditColorizeB;
|
||||
}
|
||||
|
||||
bool insTypeMenuB=settings.insTypeMenu;
|
||||
if (ImGui::Checkbox("Display instrument type menu when adding instrument",&insTypeMenuB)) {
|
||||
settings.insTypeMenu=insTypeMenuB;
|
||||
}
|
||||
|
||||
// SUBSECTION MACRO EDITOR
|
||||
CONFIG_SUBSECTION("Macro Editor");
|
||||
ImGui::Text("Macro editor layout:");
|
||||
|
@ -3018,6 +3023,7 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.removeInsOff=e->getConfInt("removeInsOff",0);
|
||||
settings.removeVolOff=e->getConfInt("removeVolOff",0);
|
||||
settings.playOnLoad=e->getConfInt("playOnLoad",0);
|
||||
settings.insTypeMenu=e->getConfInt("insTypeMenu",1);
|
||||
|
||||
clampSetting(settings.mainFontSize,2,96);
|
||||
clampSetting(settings.headFontSize,2,96);
|
||||
|
@ -3152,6 +3158,7 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.removeInsOff,0,1);
|
||||
clampSetting(settings.removeVolOff,0,1);
|
||||
clampSetting(settings.playOnLoad,0,2);
|
||||
clampSetting(settings.insTypeMenu,0,1);
|
||||
|
||||
if (settings.exportLoops<0.0) settings.exportLoops=0.0;
|
||||
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
|
||||
|
@ -3386,6 +3393,7 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("removeInsOff",settings.removeInsOff);
|
||||
e->setConf("removeVolOff",settings.removeVolOff);
|
||||
e->setConf("playOnLoad",settings.playOnLoad);
|
||||
e->setConf("insTypeMenu",settings.insTypeMenu);
|
||||
|
||||
// colors
|
||||
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
||||
|
|
Loading…
Reference in New Issue