Commit graph

3 commits

Author SHA1 Message Date
toaster
03d422560d menu_t, M_PlayMenuJam: const char *music parameter
If Playing(), does nothing.
- If NULL, cycle between Cascade Cave as is traditional.
- If ".", stop music. (will one day be used for sound test)
- Any other case, call S_ChangeMusicInternal on the string directly

Notable menu sets:
- All Extra menus, excepting the Replay Hut, use "EXTRAS"
- Replay Hut uses "REPLAY"
- All online menus use "NETMD2".
    - I know we wanted to do something with switching between "NETMDE" and "NETMD2". I would prefer a more consistent API for transferring song position across between tracks be implemented before implementing this.
    - Known bug: Music restarts when exiting from failed connection screen
    - Known bug: Music goes back to Cascade Cave when selecting "GO" for server creation
        - Wontfix as we want that button to go directly to the voting screen, which we can do in a voting revamp branch
- Data Erase, Profile Erase: "SHWDN2"
    - Not in the spec but I think it's both funny and a valuable tell for the most "dangerous" menu to play with.
    - Also shifts the background to SKINCOLOR_BLACK
2023-02-01 23:15:51 +00:00
James R
b26cd786ec Move all specialized code out of k_menufunc.c
Adds new files:

- menus/extras-statistics.c
- menus/play-online-room-select.c
- menus/transient/cup-select.c
- menus/transient/explosions.c
- menus/transient/gametype.c
- menus/transient/message-box.c
- menus/transient/virtual-keyboard.c
2023-01-12 20:31:31 -08:00
James R
0b3d04bbfd Split k_menudef.c into menus subdirectory
- src/menu contains files for each menu's definitions.
- src/menu/transient contains menus which are reused in
many places or are separate from Main Menu entirely.

File names ending in "-1" are menus which contain
a submenu. The suffix is added so that the parent menu
sorts before all its children in directory lists.

It's also done so Tab completion doesn't stop such that
a hyphen (-) would need to be typed.

For example (this is how I auto complete file names):

"ex" <TAB> completes to "extras" because the choices are
"extras.c" or "extras-addons.c" etc. Now you need to reach
away from the home row of a keyboard to type a "-" in
order to complete any of the submenu file names.

VS

"ex" <TAB> completes to "extras-". You only need to reach
to type a "1" for one menu. There may be more than one
submenu and submenu names start with letters, which are
closer to the home row.
2023-01-07 07:40:45 -08:00