GUI: add option to disable fade-in during startup

This commit is contained in:
tildearrow 2023-02-16 05:54:46 -05:00
parent 25e4da919d
commit 6fb23ab04b
3 changed files with 11 additions and 1 deletions

View file

@ -5238,7 +5238,7 @@ bool FurnaceGUI::loop() {
SDL_RenderClear(sdlRend); SDL_RenderClear(sdlRend);
mustClear--; mustClear--;
} else { } else {
if (initialScreenWipe>0.0f) { if (initialScreenWipe>0.0f && !settings.disableFadeIn) {
WAKE_UP; WAKE_UP;
initialScreenWipe-=ImGui::GetIO().DeltaTime*5.0f; initialScreenWipe-=ImGui::GetIO().DeltaTime*5.0f;
if (initialScreenWipe>0.0f) { if (initialScreenWipe>0.0f) {

View file

@ -1336,6 +1336,7 @@ class FurnaceGUI {
int macroLayout; int macroLayout;
float doubleClickTime; float doubleClickTime;
int oneDigitEffects; int oneDigitEffects;
int disableFadeIn;
unsigned int maxUndoSteps; unsigned int maxUndoSteps;
String mainFontPath; String mainFontPath;
String patFontPath; String patFontPath;
@ -1473,6 +1474,7 @@ class FurnaceGUI {
macroLayout(0), macroLayout(0),
doubleClickTime(0.3f), doubleClickTime(0.3f),
oneDigitEffects(0), oneDigitEffects(0),
disableFadeIn(0),
maxUndoSteps(100), maxUndoSteps(100),
mainFontPath(""), mainFontPath(""),
patFontPath(""), patFontPath(""),

View file

@ -1680,6 +1680,11 @@ void FurnaceGUI::drawSettings() {
settings.frameBorders=frameBordersB; settings.frameBorders=frameBordersB;
} }
bool disableFadeInB=settings.disableFadeIn;
if (ImGui::Checkbox("Disable fade-in during startup",&disableFadeInB)) {
settings.disableFadeIn=disableFadeInB;
}
ImGui::Separator(); ImGui::Separator();
ImGui::Text("Oscilloscope settings:"); ImGui::Text("Oscilloscope settings:");
@ -2586,6 +2591,7 @@ void FurnaceGUI::syncSettings() {
settings.macroLayout=e->getConfInt("macroLayout",0); settings.macroLayout=e->getConfInt("macroLayout",0);
settings.doubleClickTime=e->getConfFloat("doubleClickTime",0.3f); settings.doubleClickTime=e->getConfFloat("doubleClickTime",0.3f);
settings.oneDigitEffects=e->getConfInt("oneDigitEffects",0); settings.oneDigitEffects=e->getConfInt("oneDigitEffects",0);
settings.disableFadeIn=e->getConfInt("disableFadeIn",0);
clampSetting(settings.mainFontSize,2,96); clampSetting(settings.mainFontSize,2,96);
clampSetting(settings.patFontSize,2,96); clampSetting(settings.patFontSize,2,96);
@ -2698,6 +2704,7 @@ void FurnaceGUI::syncSettings() {
clampSetting(settings.macroLayout,0,4); clampSetting(settings.macroLayout,0,4);
clampSetting(settings.doubleClickTime,0.02,1.0); clampSetting(settings.doubleClickTime,0.02,1.0);
clampSetting(settings.oneDigitEffects,0,1); clampSetting(settings.oneDigitEffects,0,1);
clampSetting(settings.disableFadeIn,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;
@ -2904,6 +2911,7 @@ void FurnaceGUI::commitSettings() {
e->setConf("macroLayout",settings.macroLayout); e->setConf("macroLayout",settings.macroLayout);
e->setConf("doubleClickTime",settings.doubleClickTime); e->setConf("doubleClickTime",settings.doubleClickTime);
e->setConf("oneDigitEffects",settings.oneDigitEffects); e->setConf("oneDigitEffects",settings.oneDigitEffects);
e->setConf("disableFadeIn",settings.disableFadeIn);
// colors // colors
for (int i=0; i<GUI_COLOR_MAX; i++) { for (int i=0; i<GUI_COLOR_MAX; i++) {