GUI: add option to disable preset selector

This commit is contained in:
tildearrow 2023-06-24 18:55:55 -05:00
parent e0de6e0847
commit 7beb1271ae
4 changed files with 31 additions and 2 deletions

View file

@ -3,7 +3,6 @@
- tutorial? - tutorial?
- ease-of-use improvements... ideas: - ease-of-use improvements... ideas:
- preset compat flags - preset compat flags
- setting to toggle the Choose a System screen on new project
- maybe reduced set of presets for the sake of simplicity - maybe reduced set of presets for the sake of simplicity
- a more preferable highlight/drag system - a more preferable highlight/drag system
- some speed/intuitive workflow improvements that go a long way - some speed/intuitive workflow improvements that go a long way

View file

@ -5076,7 +5076,24 @@ bool FurnaceGUI::loop() {
newSongQuery=""; newSongQuery="";
newSongFirstFrame=true; newSongFirstFrame=true;
displayNew=false; 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) { if (displayEditString) {

View file

@ -1508,6 +1508,7 @@ class FurnaceGUI {
int renderClearPos; int renderClearPos;
int insertBehavior; int insertBehavior;
int pullDeleteRow; int pullDeleteRow;
int newSongBehavior;
unsigned int maxUndoSteps; unsigned int maxUndoSteps;
String mainFontPath; String mainFontPath;
String patFontPath; String patFontPath;
@ -1659,6 +1660,7 @@ class FurnaceGUI {
renderClearPos(0), renderClearPos(0),
insertBehavior(1), insertBehavior(1),
pullDeleteRow(1), pullDeleteRow(1),
newSongBehavior(0),
maxUndoSteps(100), maxUndoSteps(100),
mainFontPath(""), mainFontPath(""),
patFontPath(""), patFontPath(""),

View file

@ -508,6 +508,14 @@ void FurnaceGUI::drawSettings() {
settings.alwaysPlayIntro=3; 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(); ImGui::Separator();
if (CWSliderFloat("Double-click time (seconds)",&settings.doubleClickTime,0.02,1.0,"%.2f")) { 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.renderClearPos=e->getConfInt("renderClearPos",0);
settings.insertBehavior=e->getConfInt("insertBehavior",1); settings.insertBehavior=e->getConfInt("insertBehavior",1);
settings.pullDeleteRow=e->getConfInt("pullDeleteRow",1); settings.pullDeleteRow=e->getConfInt("pullDeleteRow",1);
settings.newSongBehavior=e->getConfInt("newSongBehavior",0);
clampSetting(settings.mainFontSize,2,96); clampSetting(settings.mainFontSize,2,96);
clampSetting(settings.patFontSize,2,96); clampSetting(settings.patFontSize,2,96);
@ -2882,6 +2891,7 @@ void FurnaceGUI::syncSettings() {
clampSetting(settings.renderClearPos,0,1); clampSetting(settings.renderClearPos,0,1);
clampSetting(settings.insertBehavior,0,1); clampSetting(settings.insertBehavior,0,1);
clampSetting(settings.pullDeleteRow,0,1); clampSetting(settings.pullDeleteRow,0,1);
clampSetting(settings.newSongBehavior,0,1);
if (settings.exportLoops<0.0) settings.exportLoops=0.0; if (settings.exportLoops<0.0) settings.exportLoops=0.0;
if (settings.exportFadeOut<0.0) settings.exportFadeOut=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("renderClearPos",settings.renderClearPos);
e->setConf("insertBehavior",settings.insertBehavior); e->setConf("insertBehavior",settings.insertBehavior);
e->setConf("pullDeleteRow",settings.pullDeleteRow); e->setConf("pullDeleteRow",settings.pullDeleteRow);
e->setConf("newSongBehavior",settings.newSongBehavior);
// colors // colors
for (int i=0; i<GUI_COLOR_MAX; i++) { for (int i=0; i<GUI_COLOR_MAX; i++) {