Merge pull request #1509 from Eknous-P/settingdetect

Settings change detect
This commit is contained in:
tildearrow 2023-10-05 18:09:24 -05:00 committed by GitHub
commit 82da85ecbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 329 additions and 36 deletions

View file

@ -5499,6 +5499,7 @@ bool FurnaceGUI::loop() {
reportError(fmt::sprintf("could NOT save layout! %s",strerror(errno))); reportError(fmt::sprintf("could NOT save layout! %s",strerror(errno)));
} }
} }
settingsChanged=true;
} }
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button("No")) { if (ImGui::Button("No")) {
@ -5509,6 +5510,7 @@ bool FurnaceGUI::loop() {
if (ImGui::Button("Yes")) { if (ImGui::Button("Yes")) {
ImGui::CloseCurrentPopup(); ImGui::CloseCurrentPopup();
resetKeybinds(); resetKeybinds();
settingsChanged=true;
} }
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button("No")) { if (ImGui::Button("No")) {
@ -5520,6 +5522,7 @@ bool FurnaceGUI::loop() {
ImGui::CloseCurrentPopup(); ImGui::CloseCurrentPopup();
resetColors(); resetColors();
applyUISettings(false); applyUISettings(false);
settingsChanged=true;
} }
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button("No")) { if (ImGui::Button("No")) {
@ -5531,12 +5534,14 @@ bool FurnaceGUI::loop() {
ImGui::CloseCurrentPopup(); ImGui::CloseCurrentPopup();
settingsOpen=false; settingsOpen=false;
willCommit=true; willCommit=true;
settingsChanged=false;
} }
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button("No")) { if (ImGui::Button("No")) {
ImGui::CloseCurrentPopup(); ImGui::CloseCurrentPopup();
settingsOpen=false; settingsOpen=false;
syncSettings(); syncSettings();
settingsChanged=false;
} }
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button("Cancel") || ImGui::IsKeyPressed(ImGuiKey_Escape)) { if (ImGui::Button("Cancel") || ImGui::IsKeyPressed(ImGuiKey_Escape)) {

View file

@ -1436,6 +1436,7 @@ class FurnaceGUI {
char emptyLabel2[32]; char emptyLabel2[32];
struct Settings { struct Settings {
bool settingsChanged;
int mainFontSize, patFontSize, headFontSize, iconSize; int mainFontSize, patFontSize, headFontSize, iconSize;
int audioEngine; int audioEngine;
int audioQuality; int audioQuality;
@ -1618,6 +1619,7 @@ class FurnaceGUI {
DivConfig initialSys; DivConfig initialSys;
Settings(): Settings():
settingsChanged(false),
mainFontSize(18), mainFontSize(18),
patFontSize(18), patFontSize(18),
headFontSize(27), headFontSize(27),

File diff suppressed because it is too large Load diff