diff --git a/.gitignore b/.gitignore index 010770d68..eeb466b4a 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,3 @@ docs/.asciidoctor/ /Menu.bat /data/ screenshots/ -screenshots-hw/ diff --git a/CHANGELOG b/CHANGELOG index 84190a622..77a941f93 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -354,10 +354,10 @@ API Changes a scrolling list on the left, up and down to select, left and right to page, Start or any button to play, and a mouse works too (click a row to select it, click it again or the Start button to play, wheel to - scroll the description). The audio delay calibration screen is a page - of the same document. The previous overlay-drawn menu is kept for one - release as Singe/MenuClassic.singe for a machine without a GPU device, - where guiNew fails; name it in Menu.sh or Menu.bat to use it. + scroll the description). The service tools are pages of the same + document. A machine without a GPU device, where guiNew fails, gets the + same menu drawn into the overlay instead; see "One menu, two renderers" + below. - Physics debug drawing. physicsSetDebug(DEBUG_*) draws the bodies in wireframe (coloured by motion state), joints and their limits, contact @@ -862,14 +862,36 @@ API Changes things that must not pass through each other -- which is what the collide calls deliberately do not do. +- One menu, two renderers. Singe/MenuClassic.singe is gone: it was the + whole menu written a second time, and the two copies duplicated their + game list, their selection, their menu.dat handling and their games.dat + walk almost line for line. Singe/Menu.singe is now everything the menu + is and draws nothing, and it picks one of two renderers at startup from + the new singeHasGpu(): Singe/MenuDocument.singe for a machine with a + GPU device, Singe/MenuOverlay.singe for one without. A machine with no + Vulkan, Direct3D 12 or Metal driver therefore gets the menu -- and all + ten service tools -- without anyone editing a launcher, which is what + editing Menu.sh used to be for. + + Both renderers take the same keys, so the overlay one now moves the + selection with up and down and pages with left and right, as the + document one does; it shows one game at a time rather than a list, and + clips a description too long for its column rather than scrolling it. + MENU_OVERLAY = true in menu.dat forces it on a machine that has a GPU. + + singeHasGpu() answers whether the GPU device came up. guiNew and the + scene calls end the script rather than returning false, so a game that + can do without one had no way to ask. + - The service tools. Pressing the SERVICE key on the bundled menu now opens a list of ten screens rather than the audio delay screen alone: Audio Delay, Input Test, System Information, Light Gun, Sound Test, Display, Disc Test, Saved Data, MIDI Ports and Frame Statistics. Button 2 backs out of a tool, the service key leaves. They live in - Singe/Tools.singe, which the engine extracts beside Menu.singe, and - each is a page of Singe/Menu.rml, so a cabinet builder can add one. - MenuClassic keeps the audio delay screen and nothing else. + Singe/Tools.singe, which the engine extracts beside Menu.singe. Nothing + there draws: a tool builds a list of rows and the menu draws them, so + the same ten run on both renderers and a cabinet builder adding one + writes no drawing code at all. Four calls were added for them, and are worth having on their own: diff --git a/CMakeLists.txt b/CMakeLists.txt index ee6aefcf4..42bfac46a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -190,7 +190,8 @@ singeEmbed(${CMAKE_SOURCE_DIR}/assets/controls.cfg ${GENERATED_DIR}/controls_cfg singeEmbed(${CMAKE_SOURCE_DIR}/assets/settings.cfg ${GENERATED_DIR}/settings_cfg.h "") singeEmbed(${CMAKE_SOURCE_DIR}/assets/Menu.singe ${GENERATED_DIR}/Menu_singe.h "") singeEmbed(${CMAKE_SOURCE_DIR}/assets/Tools.singe ${GENERATED_DIR}/Tools_singe.h "") -singeEmbed(${CMAKE_SOURCE_DIR}/assets/MenuClassic.singe ${GENERATED_DIR}/MenuClassic_singe.h "") +singeEmbed(${CMAKE_SOURCE_DIR}/assets/MenuDocument.singe ${GENERATED_DIR}/MenuDocument_singe.h "") +singeEmbed(${CMAKE_SOURCE_DIR}/assets/MenuOverlay.singe ${GENERATED_DIR}/MenuOverlay_singe.h "") singeEmbed(${CMAKE_SOURCE_DIR}/assets/Menu.rml ${GENERATED_DIR}/Menu_rml.h "") singeEmbed(${CMAKE_SOURCE_DIR}/assets/menu.rcss ${GENERATED_DIR}/menu_rcss.h "") singeEmbed(${CMAKE_SOURCE_DIR}/assets/gui.rcss ${GENERATED_DIR}/gui_rcss.h "") diff --git a/assets/Menu.rml b/assets/Menu.rml index 47ede87d3..80db6cef7 100644 --- a/assets/Menu.rml +++ b/assets/Menu.rml @@ -32,68 +32,11 @@ -
- - - - - - - - - -