Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings change detect #1509

Merged
merged 4 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/gui/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5499,6 +5499,7 @@ bool FurnaceGUI::loop() {
reportError(fmt::sprintf("could NOT save layout! %s",strerror(errno)));
}
}
settingsChanged=true;
}
ImGui::SameLine();
if (ImGui::Button("No")) {
Expand All @@ -5509,6 +5510,7 @@ bool FurnaceGUI::loop() {
if (ImGui::Button("Yes")) {
ImGui::CloseCurrentPopup();
resetKeybinds();
settingsChanged=true;
}
ImGui::SameLine();
if (ImGui::Button("No")) {
Expand All @@ -5520,6 +5522,7 @@ bool FurnaceGUI::loop() {
ImGui::CloseCurrentPopup();
resetColors();
applyUISettings(false);
settingsChanged=true;
}
ImGui::SameLine();
if (ImGui::Button("No")) {
Expand All @@ -5531,12 +5534,14 @@ bool FurnaceGUI::loop() {
ImGui::CloseCurrentPopup();
settingsOpen=false;
willCommit=true;
settingsChanged=false;
}
ImGui::SameLine();
if (ImGui::Button("No")) {
ImGui::CloseCurrentPopup();
settingsOpen=false;
syncSettings();
settingsChanged=false;
}
ImGui::SameLine();
if (ImGui::Button("Cancel") || ImGui::IsKeyPressed(ImGuiKey_Escape)) {
Expand Down
2 changes: 2 additions & 0 deletions src/gui/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -1436,6 +1436,7 @@ class FurnaceGUI {
char emptyLabel2[32];

struct Settings {
bool settingsChanged;
int mainFontSize, patFontSize, headFontSize, iconSize;
int audioEngine;
int audioQuality;
Expand Down Expand Up @@ -1618,6 +1619,7 @@ class FurnaceGUI {
DivConfig initialSys;

Settings():
settingsChanged(false),
mainFontSize(18),
patFontSize(18),
headFontSize(27),
Expand Down
Loading