diff options
-rw-r--r-- | .vscode/settings.json | 3 | ||||
-rw-r--r-- | apps/settings/main.cpp | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json index 37cfe28..a837a13 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -33,6 +33,7 @@ "typeinfo": "cpp", "pico.h": "c", "config.h": "c", - "config_autogen.h": "c" + "config_autogen.h": "c", + "ctime": "cpp" } }
\ No newline at end of file diff --git a/apps/settings/main.cpp b/apps/settings/main.cpp index d701d52..36e6cf0 100644 --- a/apps/settings/main.cpp +++ b/apps/settings/main.cpp @@ -31,7 +31,7 @@ namespace app_settings { // Set time void set0_menu(Api *app_api) { - static const char *choices[16] = {"Hour", "Minute", "Second", "Year", "Month", "Day", "Day of week", "Apply and close"}; + static const char *choices[9] = {"Hour", "Minute", "Second", "Year", "Month", "Day", "Day of week", "Apply and close", "Quit without saving"}; uint max_value; uint min_value; uint default_value; @@ -40,7 +40,7 @@ namespace app_settings { int choice = 0; while (true) { - choice = app_api->gui_popup_strchoice(SET0_NAME, SET0_DESC, choices, 8, 0, -1, choice); + choice = app_api->gui_popup_strchoice(SET0_NAME, SET0_DESC, choices, 9, 0, -1, choice); min_value = 0; switch (choice) { @@ -68,6 +68,8 @@ namespace app_settings { case 7: // Apply and exit app_api->datetime_set(&datetime); return; + case 8: // Quit without saving + return; } // Display popup for editing value |