GP2040 icon indicating copy to clipboard operation
GP2040 copied to clipboard

Layout overhaul and initial splashscreen support

Open UntrustedRoot opened this issue 3 years ago • 7 comments
trafficstars

This PR add several new layouts and includes initial support for a splash screen.

This was originally planned as a smaller PR that spiralled out of control.

Let me know about anything you need changed, scrapped, or added. I could use a little bit of help testing these changes against different setups.

Problems with this PR

  • Nothing here has been tested with the WebUI. I only built using pico-fighting-board and tested on a breadboard.
  • This might break leds.cpp and led support. I'm not setup to test this at this time. See lines 203-205 in leds.cpp
  • This might not respect your current settings if you used the ARCADE layout before
  • I have no business codding in C++, and I thank you for allowing me to contribute 😄

Layouts changes

  • Split the layouts into two halves, allowing for mix-and-match button and stick layouts.
  • Renamed ARCADE layout to UDLR
  • Removed buttons from ARCADE, HITBOX, and WASDB. Created ARCADEB, HITBOXB, and WASDB from removed button layouts
  • Replaced ARCADE with an 'animated' arcade stick.
  • Added the following layouts:
    • MIXBOX: WASD, but with keyboard style buttons
    • MAME: Keyboard style layout. More of a cosmetic layout for the display. 6 buttons.
    • VEWLIX
    • CAPCOM
    • CAPCOM6: CAPCOM, but 6 buttons
    • SEGA2P
    • NOIR8

Layouts can be set using BUTTON_LAYOUT and BUTTON_LAYOUT_RIGHT in BoardConfig.h, check enums.h

Splash screen addition

  • Initial support, works but needs work
  • All splashes are hard coded to 7500ms
  • No WebUI support
  • Added the following splash modes:
    • STATICSPLASH: Display custom bitmap if it exists, GP2040 logo if it does not. Default to show off.
    • CLOSEIN: 'Animated' GP2040 logo
    • CLOSEINCUSTOM: CLOSEIN, but it shows the custom bitmap, if it exists.
    • NOSPLASH: No splash, no delay, all action.
  • Adds additional header file called bitmaps.h

Splash modes can be set using SPLASH_MODE in BoardConfig.h.

UntrustedRoot avatar Feb 21 '22 20:02 UntrustedRoot

Just adding a few things I forgot to put in the PR post.

  • The Noir8 layout has an issue and is not correct. I will address this and push. The right half is higher then it should be. (I'll note that there are two versions of the Noir8 from what I've seen. Slagcoin makes it look like the Sega2p with a small change, but Focus Attack and BNB have additional differences that make it closer to a slanted Vewlix.)
  • The button side of the layouts all work, but need a cleanup. The start position includes a large amount of empty space to push the layouts over to the right. This is a holdover from when the layouts were not split and will need to be adjusted. This needs to be corrected as the layouts will not scale correctly as is. Ongoing work is being done on this.

The above issues are really cosmetic and do not affect the function of this PR. The second issue needs to be corrected before I can test against smaller and larger screens. Any testing on the PR as is would be appreciated as my setup doesn't reflect most GP2040 users.

UntrustedRoot avatar Feb 22 '22 19:02 UntrustedRoot

Hi @UntrustedRoot,

We are looking to keep the GP2040 project alive over on the Community Edition of GP2040: https://github.com/OpenStickFoundation/GP2040-CE

I tried to compile your changes but am getting an error on SPLASH_MODE.

Would love to chat further about this as your changes are fantastic!

TheTrainGoes avatar Aug 07 '22 19:08 TheTrainGoes

Update - Got it compiled. For those that might be looking at this there is no included BoardConfig.h so you will need to add something for SPLASH_MODE and BUTTON_LAYOUT_RIGHT into the normal PicoFightingBoard config file.

Example:

#define SPLASH_MODE CLOSEINCUSTOM #define BUTTON_LAYOUT_RIGHT BUTTON_LAYOUT_ARCADEB

TheTrainGoes avatar Aug 07 '22 19:08 TheTrainGoes

Hey @TheTrainGoes, I have a few issues with my PR I'd like to discuss, it's a lack of experience issue and I don't want to be a bother. I also have something else I'd like to talk to you about that I cannot put here (it's a secret. shhhhh....)

Do you mind if I PM you on Discord to discuss? I don't like just showing up in your PMs unannounced.

UntrustedRoot avatar Aug 09 '22 14:08 UntrustedRoot

Hey @UntrustedRoot , please do!

TheTrainGoes avatar Aug 09 '22 15:08 TheTrainGoes

Hey @UntrustedRoot not sure if you sent anything but I have not gotten a request on Discord. I am listed there as TheTrain#6755

TheTrainGoes avatar Aug 10 '22 17:08 TheTrainGoes

I will be porting/rebuilding this PR for GP2040-CE over here: https://github.com/FBUFS/GP2040-CE/tree/oled-CE GitHub doesn't let you fork a fork that you've forked before so I had to make an org to keep these side by side. Once the new PR is merged into GP2040-CE I'll nuke both forks and start fresh.

UntrustedRoot avatar Aug 12 '22 13:08 UntrustedRoot