GUI: Checkerboard overlay behind popup elements (#380)

* GUI: Checkerboard overlay behind popup elements

Adds setting 'Popup Overlay' (default ON) which draws a checkerboard pattern behind popups, like the Archive actions menu, keypad/pin lock modal, and the varitemlist locked message. Gives the illusion of separation from the popup element and the background content and is an aesthetic improvement.

* Refactor

* Update changelog

---------

Co-authored-by: Willy-JL <49810075+Willy-JL@users.noreply.github.com>
This commit is contained in:
Alexander Bays
2025-04-12 21:59:28 -05:00
committed by GitHub
parent 21c9852666
commit 16fb7e44df
10 changed files with 127 additions and 57 deletions

View File

@@ -26,6 +26,14 @@ static void momentum_app_scene_interface_general_midnight_format_changed(Variabl
app->save_settings = true;
}
static void momentum_app_scene_interface_general_popup_overlay_changed(VariableItem* item) {
MomentumApp* app = variable_item_get_context(item);
bool value = variable_item_get_current_value_index(item);
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
momentum_settings.popup_overlay = value;
app->save_settings = true;
}
void momentum_app_scene_interface_general_on_enter(void* context) {
MomentumApp* app = context;
VariableItemList* var_item_list = app->var_item_list;
@@ -51,6 +59,15 @@ void momentum_app_scene_interface_general_on_enter(void* context) {
variable_item_set_current_value_text(
item, momentum_settings.midnight_format_00 ? "00:XX" : "12:XX");
item = variable_item_list_add(
var_item_list,
"Popup Overlay",
2,
momentum_app_scene_interface_general_popup_overlay_changed,
app);
variable_item_set_current_value_index(item, momentum_settings.popup_overlay);
variable_item_set_current_value_text(item, momentum_settings.popup_overlay ? "ON" : "OFF");
variable_item_list_set_enter_callback(
var_item_list, momentum_app_scene_interface_general_var_item_list_callback, app);