Skip to content

Conversation

JeodC
Copy link
Contributor

@JeodC JeodC commented Apr 11, 2025

  • Nintendo / Xbox button layouts now in new file config.py
  • New menu option allows user to toggle between the two layouts
  • Layout saved to .env on toggle
  • Layouts swap colors for A-B and X-Y as well as Platforms/Collections views
  • Letters on buttons remain the same, only sdl positions swap

image

@gantoine gantoine requested review from Copilot and gantoine April 24, 2025 16:27
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for Nintendo and Xbox button layout options by introducing a new config file and modifying UI/input handling to toggle between the layouts and persist the selection in the .env file.

  • Introduces config.py to centralize button colors and layout definitions.
  • Updates UI rendering and input processing in RomM/ui.py and RomM/romm.py to use get_controller_layout().
  • Adjusts main.py to initialize controller layout settings and logging paths.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
RomM/ui.py Removed hard-coded color definitions in favor of config-based layout retrieval.
RomM/romm.py Updated button configuration and input key checking to support layout toggling.
RomM/main.py Loads and sets the controller layout from the environment before starting the app.
RomM/config.py New file defining button layout configurations and helper functions.
Comments suppressed due to low confidence (1)

RomM/romm.py:738

  • Consider adding automated tests to cover the new toggle layout functionality to ensure proper behavior when switching between Nintendo and Xbox layouts.
elif selected_pos == self.start_menu_options[2][1]:

@gantoine gantoine merged commit 49446fb into rommapp:main Apr 24, 2025
1 check passed
@JeodC JeodC deleted the button_layouts branch April 24, 2025 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants