diff --git a/TODO.md b/TODO.md index 3df1e22b..20c54eb9 100644 --- a/TODO.md +++ b/TODO.md @@ -3,7 +3,6 @@ - tutorial? - ease-of-use improvements... ideas: - preset compat flags - - setting to toggle the Choose a System screen on new project - maybe reduced set of presets for the sake of simplicity - a more preferable highlight/drag system - some speed/intuitive workflow improvements that go a long way diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 4edaeab2..eb8b9943 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -5076,7 +5076,24 @@ bool FurnaceGUI::loop() { newSongQuery=""; newSongFirstFrame=true; displayNew=false; - ImGui::OpenPopup("New Song"); + if (settings.newSongBehavior==1) { + e->createNewFromDefaults(); + undoHist.clear(); + redoHist.clear(); + curFileName=""; + modified=false; + curNibble=false; + orderNibble=false; + orderCursor=-1; + samplePos=0; + updateSampleTex=true; + selStart=SelectionPoint(); + selEnd=SelectionPoint(); + cursor=SelectionPoint(); + updateWindowTitle(); + } else { + ImGui::OpenPopup("New Song"); + } } if (displayEditString) { diff --git a/src/gui/gui.h b/src/gui/gui.h index 77199a6c..8eae6a53 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -1508,6 +1508,7 @@ class FurnaceGUI { int renderClearPos; int insertBehavior; int pullDeleteRow; + int newSongBehavior; unsigned int maxUndoSteps; String mainFontPath; String patFontPath; @@ -1659,6 +1660,7 @@ class FurnaceGUI { renderClearPos(0), insertBehavior(1), pullDeleteRow(1), + newSongBehavior(0), maxUndoSteps(100), mainFontPath(""), patFontPath(""), diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 33a6c5c6..3da60316 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -508,6 +508,14 @@ void FurnaceGUI::drawSettings() { settings.alwaysPlayIntro=3; } + ImGui::Text("When creating new song:"); + if (ImGui::RadioButton("Display system preset selector##NSB0",settings.newSongBehavior==0)) { + settings.newSongBehavior=0; + } + if (ImGui::RadioButton("Start with initial system##NSB1",settings.newSongBehavior==1)) { + settings.newSongBehavior=1; + } + ImGui::Separator(); if (CWSliderFloat("Double-click time (seconds)",&settings.doubleClickTime,0.02,1.0,"%.2f")) { @@ -2757,6 +2765,7 @@ void FurnaceGUI::syncSettings() { settings.renderClearPos=e->getConfInt("renderClearPos",0); settings.insertBehavior=e->getConfInt("insertBehavior",1); settings.pullDeleteRow=e->getConfInt("pullDeleteRow",1); + settings.newSongBehavior=e->getConfInt("newSongBehavior",0); clampSetting(settings.mainFontSize,2,96); clampSetting(settings.patFontSize,2,96); @@ -2882,6 +2891,7 @@ void FurnaceGUI::syncSettings() { clampSetting(settings.renderClearPos,0,1); clampSetting(settings.insertBehavior,0,1); clampSetting(settings.pullDeleteRow,0,1); + clampSetting(settings.newSongBehavior,0,1); if (settings.exportLoops<0.0) settings.exportLoops=0.0; if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0; @@ -3103,6 +3113,7 @@ void FurnaceGUI::commitSettings() { e->setConf("renderClearPos",settings.renderClearPos); e->setConf("insertBehavior",settings.insertBehavior); e->setConf("pullDeleteRow",settings.pullDeleteRow); + e->setConf("newSongBehavior",settings.newSongBehavior); // colors for (int i=0; i