skyfloogle / red-viper

A Virtual Boy emulator for the 3DS
764 stars 17 forks source link

Button input in GUI #47

Closed JeffRuLz closed 3 months ago

JeffRuLz commented 3 months ago

This change allows users to navigate the GUI with the 3DS's buttons. D-Pad: Highlight buttons A: Press highlighted button B: Press button labeled "Back" X: Press button labeled "Up" Pressing left or right on the file selector will jump up or down 10 list items.

This is a lazy/incomplete implementation because not all settings can be changed without the touch screen, such as the color selector, touch controls editor, and button config toggle switches. However I'm satisfied with just being able to navigate the file selector with button controls and I believe many other people will be too. No button will be highlighted after changing menu screens, requiring users to press a direction once to select the first button. It's not very professional but it doesn't bother me personally.

Buttons are highlighted with the d-pad by searching for the nearest button in the pressed direction. This means it should continue to work if buttons are added or moved around in the future without needing to link buttons together manually. This behavior can be overridden with the "buttonLock" variable for more specific control methods, as seen in the rom_loader function.

Again, this implementation can use more polish but I think it's a good start and it satisfies my needs.

skyfloogle commented 3 months ago

This is much nicer than what I was planning on doing. Nice job!

SpiceWare commented 3 months ago

Thanks, the D-Pad and button input works great!

Red-Viper was the first program I installed on my 3DS via a QR Code, so I had to figure out how to update the program. I found a current build on the Actions tab, then found 3DS-FBI-Link (a Mac specific program) that let me install the current build.