GUI: add loop/fade out persistence setting
This commit is contained in:
parent
2cca889bb6
commit
0645b451a5
|
|
@ -5079,6 +5079,11 @@ bool FurnaceGUI::init() {
|
|||
|
||||
syncSettings();
|
||||
|
||||
if (!settings.persistFadeOut) {
|
||||
exportLoops=settings.exportLoops;
|
||||
exportFadeOut=settings.exportFadeOut;
|
||||
}
|
||||
|
||||
for (int i=0; i<settings.maxRecentFile; i++) {
|
||||
String r=e->getConfString(fmt::sprintf("recentFile%d",i),"");
|
||||
if (!r.empty()) {
|
||||
|
|
@ -5378,8 +5383,10 @@ bool FurnaceGUI::finish() {
|
|||
e->setConf("followPattern",followPattern);
|
||||
e->setConf("orderEditMode",orderEditMode);
|
||||
e->setConf("noteInputPoly",noteInputPoly);
|
||||
e->setConf("exportLoops",exportLoops);
|
||||
e->setConf("exportFadeOut",exportFadeOut);
|
||||
if (settings.persistFadeOut) {
|
||||
e->setConf("exportLoops",exportLoops);
|
||||
e->setConf("exportFadeOut",exportFadeOut);
|
||||
}
|
||||
|
||||
// commit oscilloscope state
|
||||
e->setConf("oscZoom",oscZoom);
|
||||
|
|
|
|||
|
|
@ -1213,6 +1213,9 @@ class FurnaceGUI {
|
|||
int maxRecentFile;
|
||||
int centerPattern;
|
||||
int ordersCursor;
|
||||
int persistFadeOut;
|
||||
int exportLoops;
|
||||
double exportFadeOut;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
String patFontPath;
|
||||
|
|
@ -1340,6 +1343,9 @@ class FurnaceGUI {
|
|||
maxRecentFile(10),
|
||||
centerPattern(0),
|
||||
ordersCursor(1),
|
||||
persistFadeOut(1),
|
||||
exportLoops(0),
|
||||
exportFadeOut(0.0),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
patFontPath(""),
|
||||
|
|
|
|||
|
|
@ -548,6 +548,24 @@ void FurnaceGUI::drawSettings() {
|
|||
settings.saveUnusedPatterns=saveUnusedPatternsB;
|
||||
}
|
||||
|
||||
ImGui::Text("Audio export loop/fade out time:");
|
||||
if (ImGui::RadioButton("Set to these values on start-up:##fot0",settings.persistFadeOut==0)) {
|
||||
settings.persistFadeOut=0;
|
||||
}
|
||||
ImGui::BeginDisabled(settings.persistFadeOut);
|
||||
if (ImGui::InputInt("Loops",&settings.exportLoops,1,2)) {
|
||||
if (exportLoops<0) exportLoops=0;
|
||||
exportLoops=settings.exportLoops;
|
||||
}
|
||||
if (ImGui::InputDouble("Fade out (seconds)",&settings.exportFadeOut,1.0,2.0,"%.1f")) {
|
||||
if (exportFadeOut<0.0) exportFadeOut=0.0;
|
||||
exportFadeOut=settings.exportFadeOut;
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
if (ImGui::RadioButton("Remember last values##fot1",settings.persistFadeOut==1)) {
|
||||
settings.persistFadeOut=1;
|
||||
}
|
||||
|
||||
ImGui::Text("Note preview behavior:");
|
||||
if (ImGui::RadioButton("Never##npb0",settings.notePreviewBehavior==0)) {
|
||||
settings.notePreviewBehavior=0;
|
||||
|
|
@ -2376,6 +2394,9 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.midiOutMode=e->getConfInt("midiOutMode",1);
|
||||
settings.centerPattern=e->getConfInt("centerPattern",0);
|
||||
settings.ordersCursor=e->getConfInt("ordersCursor",1);
|
||||
settings.persistFadeOut=e->getConfInt("persistFadeOut",1);
|
||||
settings.exportLoops=e->getConfInt("exportLoops",0);
|
||||
settings.exportFadeOut=e->getConfDouble("exportFadeOut",0.0);
|
||||
|
||||
clampSetting(settings.mainFontSize,2,96);
|
||||
clampSetting(settings.patFontSize,2,96);
|
||||
|
|
@ -2481,6 +2502,10 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.midiOutMode,0,2);
|
||||
clampSetting(settings.centerPattern,0,1);
|
||||
clampSetting(settings.ordersCursor,0,1);
|
||||
clampSetting(settings.persistFadeOut,0,1);
|
||||
|
||||
if (settings.exportLoops<0.0) settings.exportLoops=0.0;
|
||||
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
|
||||
|
||||
String initialSys2=e->getConfString("initialSys2","");
|
||||
if (initialSys2.empty()) {
|
||||
|
|
@ -2647,6 +2672,9 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("midiOutMode",settings.midiOutMode);
|
||||
e->setConf("centerPattern",settings.centerPattern);
|
||||
e->setConf("ordersCursor",settings.ordersCursor);
|
||||
e->setConf("persistFadeOut",settings.persistFadeOut);
|
||||
e->setConf("exportLoops",settings.exportLoops);
|
||||
e->setConf("exportFadeOut",settings.exportFadeOut);
|
||||
|
||||
// colors
|
||||
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue