This Pull Request addresses issue #147 in the Sucury project. Previously, the main menu was navigable only through mouse interactions. This update adds keyboard navigation alongside existing mouse interaction capabilities, providing a more versatile and accessible user experience. Users can now navigate the main menu using both the keyboard and the mouse, selecting options like "PLAY", "OPTIONS", and "QUIT" with either method.
Proposed Changes
Main Menu Keyboard Navigation: Introduced keyboard navigation in the main_menu() function. Users can navigate between menu items using the up and down arrow keys and select an option with the Enter key.
Simultaneous Mouse and Keyboard Support: Maintained the existing mouse interaction capabilities while integrating the new keyboard navigation, allowing users to choose their preferred method of interaction.
Code Refactoring: Minor refactoring in the main_menu() function for cleaner integration of the new feature.
How to Test
Launch the Game: Start the Sucury game.
Navigate the Main Menu: Use the up and down arrow keys to navigate through the menu options. Press the Enter key to select an option.
Mouse Interaction: Alternatively, use the mouse to click on the menu options.
Switch Between Methods: Try switching between keyboard and mouse navigation to ensure both methods work seamlessly.
Access All Options: Ensure that all menu options ("PLAY", "OPTIONS", "QUIT") are accessible and functional using both interaction methods.
This Pull Request addresses issue #147 in the Sucury project. Previously, the main menu was navigable only through mouse interactions. This update adds keyboard navigation alongside existing mouse interaction capabilities, providing a more versatile and accessible user experience. Users can now navigate the main menu using both the keyboard and the mouse, selecting options like "PLAY", "OPTIONS", and "QUIT" with either method.
Proposed Changes
main_menu()
function. Users can navigate between menu items using the up and down arrow keys and select an option with the Enter key.main_menu()
function for cleaner integration of the new feature.How to Test