diff --git a/src/gui/gui.h b/src/gui/gui.h index 8c850fd0..98a86112 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -842,6 +842,8 @@ class FurnaceGUI { int notePreviewBehavior; int powerSave; int absorbInsInput; + int eventDelay; + int moveWindowTitle; unsigned int maxUndoSteps; String mainFontPath; String patFontPath; @@ -917,6 +919,8 @@ class FurnaceGUI { notePreviewBehavior(1), powerSave(1), absorbInsInput(0), + eventDelay(0), + moveWindowTitle(0), maxUndoSteps(100), mainFontPath(""), patFontPath(""), diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index c7a23511..61493722 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -313,6 +313,21 @@ void FurnaceGUI::drawSettings() { settings.sysFileDialog=sysFileDialogB; } + bool moveWindowTitleB=settings.moveWindowTitle; + if (ImGui::Checkbox("Only allow window movement when clicking on title bar",&moveWindowTitleB)) { + settings.moveWindowTitle=moveWindowTitleB; + applyUISettings(false); + } + + bool eventDelayB=settings.eventDelay; + if (ImGui::Checkbox("Enable event delay",&eventDelayB)) { + settings.eventDelay=eventDelayB; + applyUISettings(false); + } + if (ImGui::IsItemHovered()) { + ImGui::SetTooltip("may cause issues with high-polling-rate mice when previewing notes."); + } + bool powerSaveB=settings.powerSave; if (ImGui::Checkbox("Power-saving mode",&powerSaveB)) { settings.powerSave=powerSaveB; @@ -1651,6 +1666,8 @@ void FurnaceGUI::syncSettings() { settings.notePreviewBehavior=e->getConfInt("notePreviewBehavior",1); settings.powerSave=e->getConfInt("powerSave",POWER_SAVE_DEFAULT); settings.absorbInsInput=e->getConfInt("absorbInsInput",0); + settings.eventDelay=e->getConfInt("eventDelay",0); + settings.moveWindowTitle=e->getConfInt("moveWindowTitle",0); clampSetting(settings.mainFontSize,2,96); clampSetting(settings.patFontSize,2,96); @@ -1715,6 +1732,8 @@ void FurnaceGUI::syncSettings() { clampSetting(settings.notePreviewBehavior,0,3); clampSetting(settings.powerSave,0,1); clampSetting(settings.absorbInsInput,0,1); + clampSetting(settings.eventDelay,0,1); + clampSetting(settings.moveWindowTitle,0,1); // keybinds for (int i=0; isetConf("notePreviewBehavior",settings.notePreviewBehavior); e->setConf("powerSave",settings.powerSave); e->setConf("absorbInsInput",settings.absorbInsInput); + e->setConf("eventDelay",settings.eventDelay); + e->setConf("moveWindowTitle",settings.moveWindowTitle); // colors for (int i=0; i