Create a 2nd screenshot for the bottom part of the main Settings menu

This commit is contained in:
kdmukai
2025-12-20 14:34:49 -06:00
parent 6229f0270a
commit c5bff2ae80
2 changed files with 14 additions and 8 deletions
+11 -8
View File
@@ -19,10 +19,11 @@ class SettingsMenuView(View):
DONATE = ButtonOption("Donate")
VERSION = ButtonOption("Version")
def __init__(self, visibility: str = SettingsConstants.VISIBILITY__GENERAL, selected_attr: str = None, initial_scroll: int = 0):
def __init__(self, visibility: str = SettingsConstants.VISIBILITY__GENERAL, selected_attr: str = None, selected_button_option: ButtonOption = None, initial_scroll: int = 0):
super().__init__()
self.visibility = visibility
self.selected_attr = selected_attr
self.selected_button_option = selected_button_option
# Used to preserve the rendering position in the list
self.initial_scroll = initial_scroll
@@ -34,13 +35,6 @@ class SettingsMenuView(View):
)
button_data: list[ButtonOption] = [ButtonOption(e.display_name) for e in settings_entries]
selected_button = 0
if self.selected_attr:
for i, entry in enumerate(settings_entries):
if entry.attr_name == self.selected_attr:
selected_button = i
break
if self.visibility == SettingsConstants.VISIBILITY__GENERAL:
title = _("Settings")
@@ -67,6 +61,15 @@ class SettingsMenuView(View):
title = _("Dev Options")
next_destination = None
selected_button = 0
if self.selected_button_option:
selected_button = button_data.index(self.selected_button_option)
elif self.selected_attr:
for i, entry in enumerate(settings_entries):
if entry.attr_name == self.selected_attr:
selected_button = i
break
selected_menu_num = self.run_screen(
ButtonListScreen,
title=title,
+3
View File
@@ -211,6 +211,9 @@ def generate_screenshots(locale):
# Add the top level "General" settings menu and entries
settings_views_list.append(ScreenshotConfig(settings_views.SettingsMenuView))
# Scroll the general settings to the bottom
settings_views_list.append(ScreenshotConfig(settings_views.SettingsMenuView, dict(selected_button_option=settings_views.SettingsMenuView.VERSION), screenshot_name="SettingsMenuView_2"))
add_settings_entries(SettingsConstants.VISIBILITY__GENERAL)
# Add the "Advanced" menu...