Skip to content

Reorganize Settings screen and register up/down direction icons#348

Merged
NathanNeurotic merged 24 commits into
BETA-8from
codex/update-settings-page-layout-and-icons
Mar 5, 2026
Merged

Reorganize Settings screen and register up/down direction icons#348
NathanNeurotic merged 24 commits into
BETA-8from
codex/update-settings-page-layout-and-icons

Conversation

@NathanNeurotic
Copy link
Copy Markdown
Owner

Motivation

  • Improve the Settings page layout to be more organized and fluent by placing the page title and BDMA control at the top and grouping the POPStarter profile section below it.
  • Surface missing directional icons so navigation affordances (left/right for BDMA, up/down for profile selection) are visually present.

Description

  • Register up and down assets in bin/POPSLDR/images.lua so IMG.up and IMG.down resolve at runtime.
  • Update UI.ProfileQuery.Play in bin/POPSLDR/ui.lua to change the top title to "Settings" and move the BDMA Mode row directly under the title while keeping the existing left/right icon rendering around the BDMA value.
  • Group the POPStarter profile section below BDMA by drawing "Choose POPStarter Profile" (with IMG.up and IMG.down shown on the left/right), then rendering Profile X, the profile description, and the POPSTARTER.ELF path together below it.
  • Preserve all existing input/event handling and behavior (UP/DOWN still change profile, LEFT/RIGHT still change BDMA); only presentation/layout code was adjusted.

Testing

  • Verified the file diffs and contents to confirm bin/POPSLDR/images.lua contains {"up","up.png"} and {"down","down.png"} and bin/POPSLDR/ui.lua contains the updated UI.ProfileQuery.Play layout, with automated text search confirming the expected lines were inserted.
  • Confirmed diffs show only the two intended files were modified and the overall patch size is 2 files changed, 18 insertions(+), 5 deletions(-).
  • Executed automated file inspections that validated IMG.up/IMG.down references exist and the BDMA/profile drawing logic was repositioned as required, and those checks passed.

Codex Task

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the user experience of the Settings screen by restructuring its visual elements and introducing clearer navigation cues. The changes aim to make the interface more intuitive and visually consistent without altering any underlying functionality or input handling.

Highlights

  • Settings Screen Reorganization: The layout of the Settings page has been improved for better organization and flow, placing the page title and BDMA control at the top, with the POPStarter profile section grouped below it.
  • Directional Icon Registration: New 'up' and 'down' directional icons have been registered and integrated into the UI to visually indicate navigation affordances for profile selection.
Changelog
  • bin/POPSLDR/images.lua
    • Registered 'up' and 'down' image assets to make them available for use in the UI.
  • bin/POPSLDR/ui.lua
    • Updated the UI.ProfileQuery.Play function to change the main title to 'Settings'.
    • Relocated the 'BDMA Mode' display to appear directly under the new 'Settings' title.
    • Reorganized the POPStarter profile selection section, moving it below the BDMA control.
    • Integrated the newly registered 'up' and 'down' icons around the 'Choose POPStarter Profile' text to indicate navigation.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request reorganizes the Settings screen for better layout and adds up/down directional icons. The changes in images.lua to register the new icons are correct. In ui.lua, the layout logic is updated as described. I've identified a potential crash if no POPStarter profiles are configured and suggested a fix. I also have a couple of suggestions to improve the maintainability of the layout code by replacing magic numbers with named constants and addressing a potential visual imbalance due to asymmetric icon positioning.

Comment thread bin/POPSLDR/ui.lua Outdated
Comment on lines +1266 to +1267
Font.ftPrint(BFONT, UI.SCR.X_MID, profile_title_y + 78, 8, UI.SCR.X, 16, PLDR.PROFILES[UI.ProfileQuery.curopt].DESC, UI.CCOL.GREY)
Font.ftPrint(BFONT, UI.SCR.X_MID, profile_title_y + 128, 8, UI.SCR.X, 16, PLDR.PROFILES[UI.ProfileQuery.curopt].ELF, Color.new(128,128,128, 110))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

If PLDR.PROFILES is empty, profcnt will be 0. UI.ProfileQuery.curopt could still be 1, which would cause a crash on these lines when trying to access fields on a nil value. The entire block for drawing the profile selection (lines 1255-1267) should be wrapped in an if profcnt > 0 then ... end block to prevent this.

Comment thread bin/POPSLDR/ui.lua Outdated
Comment on lines +1255 to +1267
local profile_title_y = layout.TITLE_Y + 92
local up_icon = IMG.up
local down_icon = IMG.down
Font.ftPrint(BFONT, UI.SCR.X_MID, profile_title_y, 8, UI.SCR.X, 16, "Choose POPStarter Profile", UI.CCOL.GREY)
if up_icon ~= nil then
Graphics.drawImage(up_icon, UI.SCR.X_MID - 150, profile_title_y - 2, UI.CCOL.GREY)
end
if down_icon ~= nil then
Graphics.drawImage(down_icon, UI.SCR.X_MID + 128, profile_title_y - 2, UI.CCOL.GREY)
end
Font.ftPrint(BFONT, UI.SCR.X_MID, profile_title_y + 30, 8, UI.SCR.X, 16, "Profile "..UI.ProfileQuery.curopt, UI.CCOL.GREY)
Font.ftPrint(BFONT, UI.SCR.X_MID, profile_title_y + 78, 8, UI.SCR.X, 16, PLDR.PROFILES[UI.ProfileQuery.curopt].DESC, UI.CCOL.GREY)
Font.ftPrint(BFONT, UI.SCR.X_MID, profile_title_y + 128, 8, UI.SCR.X, 16, PLDR.PROFILES[UI.ProfileQuery.curopt].ELF, Color.new(128,128,128, 110))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This function uses several magic numbers for vertical positioning of UI elements (e.g., 92, 30, 78, 128). This also applies to the 30 used for mode_y on line 1243. To improve readability and maintainability, consider defining these as named constants within the UI.LAYOUT table. This would make the layout logic clearer and easier to adjust in the future.

Comment thread bin/POPSLDR/ui.lua Outdated
Comment on lines +1260 to +1263
Graphics.drawImage(up_icon, UI.SCR.X_MID - 150, profile_title_y - 2, UI.CCOL.GREY)
end
if down_icon ~= nil then
Graphics.drawImage(down_icon, UI.SCR.X_MID + 128, profile_title_y - 2, UI.CCOL.GREY)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The horizontal offsets for the up and down icons (-150 and +128 from screen center) are asymmetric. Since the text 'Choose POPStarter Profile' is constant and centered, one would expect symmetric offsets for the icons on either side for visual balance. If this asymmetry is not intentional (e.g., to account for different icon widths), consider using symmetric values like -150 and +150.

@NathanNeurotic NathanNeurotic merged commit 7f7fe6b into BETA-8 Mar 5, 2026
@NathanNeurotic NathanNeurotic deleted the codex/update-settings-page-layout-and-icons branch March 28, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant