Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: walknight on July 31, 2020, 01:15:24 PM

Title: Multilevel menu
Post by: walknight on July 31, 2020, 01:15:24 PM
Hello everyone. I just started using AM coming from another front-end.
I want to set up things the same way I had before, like:

Code: [Select]
Arcade
   Genres
   Systems
   Collections
   ...
Consoles
   Sega
       Genesis
       SMS
   Nintendo
       GBA
       GBC
   ...
Handhelds
   SNK
   Nintendo
   ...

That is I want to navigate these different levels of system using joysticks and buttons, without having to bring up the configure menu.
What is the AM way of doing this? Sorry if it's a dumb question. The tutorial I found only talked about setting up MAME.
Title: Re: Multilevel menu
Post by: progets on July 31, 2020, 03:24:26 PM
You just create a romlist and use the @ in the emulator field. This tells AM that it's a shortcut to another "Display".

Example of Consoles.txt romlist
Code: [Select]
#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons;Series;Language;Region;Rating
NES;NES;@;;;;;;;;;;;;;;;;;;
SMS;SMS;@;;;;;;;;;;;;;;;;;;
Title: Re: Multilevel menu
Post by: walknight on July 31, 2020, 04:53:36 PM
Thanks again, progets. Is there a full documentation where I can read all about this?
Title: Re: Multilevel menu
Post by: akafox on July 31, 2020, 08:57:38 PM
@ progets

Explain it to me like I am three and a half....because I am.

(well I am in fox years! o.o)
Title: Re: Multilevel menu
Post by: progets on July 31, 2020, 11:17:29 PM
I know there are some posts on the forum that talk about this but I couldn't find them. I don't think this feature is mentioned in any official documents (other than the github commit).

I will give an example that entails modifying or manually creating romlist.txt files and the attract.cfg. This configuration can also be done from the GUI but is easier to describe/explain this way.

For my example I will just use four systems (NES, SMS, GBC and Lynx) under two submenus (Consoles and Handhelds). You can use as many systems or submenu levels as you want in your setup.

Example menu layout.
Consoles
     NES
     SMS
HandHelds
     GBC
     Lynx

First, we need to create romlists called Consoles.txt and Handhelds.txt in /attract/romlists/ as show below.

Consoles.txt
Code: [Select]
#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons;Series;Language;Region;Rating
NES;NES;@;;;;;;;;;;;;;;;;;;
SMS;SMS;@;;;;;;;;;;;;;;;;;;

Handhelds.txt
Code: [Select]
#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons;Series;Language;Region;Rating
GBC;GBC;@;;;;;;;;;;;;;;;;;;
Lynx;Lynx;@;;;;;;;;;;;;;;;;;;

When AM sees the "@" symbol in the emulator field it knows that you want a shortcut to the "Display" defined in the "Name" field and will take you to that "Display" instead of launching a game if the emulator name was in that field.

Next, you need to modify your attract.cfg to add your new Consoles and Handheld "Displays" and hide the actual game system "Displays" (I'm assuming you already have these created) from the menus so you will only see the "Displays" that have the shortcuts (@) and not the ones with actual emulators defined. You also need to make sure that attract.cfg is set to use the "Displays Menu"

Pieces of the attract.cfg
Code: [Select]
# Generated by Attract-Mode v2.6.1
#
display Consoles
layout               Attrac-Man
romlist              Consoles
in_cycle             yes
in_menu              yes

display Handhelds
layout               Attrac-Man
romlist              Handhelds
in_cycle             yes
in_menu              yes

display NES
layout               Attrac-Man
romlist              NES
in_cycle             no
in_menu              no

display SMS
layout               Attrac-Man
romlist              SMS
in_cycle             no
in_menu              no

display GBC
layout               Attrac-Man
romlist              GBC
in_cycle             no
in_menu              no

display Lynx
layout               Attrac-Man
romlist              Lynx
in_cycle             no
in_menu              no

general
startup_mode         displays_menu

I should also suggest you make a backup of the attract.cfg file in case things go wrong so you can switch back to it.
Title: Re: Multilevel menu
Post by: progets on July 31, 2020, 11:45:30 PM
Example of files for OP.

Arcade.txt romlist
Code: [Select]
#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons;Series;Language;Region;Rating
Genres;Genres;@;;;;;;;;;;;;;;;;;;
Systems;Systems;@;;;;;;;;;;;;;;;;;;
Collections;Collections;@;;;;;;;;;;;;;;;;;;

Consoles.txt romlist
Code: [Select]
#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons;Series;Language;Region;Rating
Sega;Sega;@;;;;;;;;;;;;;;;;;;
Nintendo;Nintendo;@;;;;;;;;;;;;;;;;;;

Sega.txt romlist
Code: [Select]
#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons;Series;Language;Region;Rating
Genesis;Genesis;@;;;;;;;;;;;;;;;;;;
SMS;SMS;@;;;;;;;;;;;;;;;;;;

Nintendo.txt romlist
Code: [Select]
#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons;Series;Language;Region;Rating
GBA;GBA;@;;;;;;;;;;;;;;;;;;
GBC;GBC;@;;;;;;;;;;;;;;;;;;

Handhelds.txt romlist
Code: [Select]
#Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons;Series;Language;Region;Rating
SNK;SNK;@;;;;;;;;;;;;;;;;;;
Nintendo_HH;Nintendo_HH;@;;;;;;;;;;;;;;;;;;

Pieces of the attract.cfg
Code: [Select]
# Generated by Attract-Mode v2.6.1
#
display Arcade
layout               Attrac-Man
romlist              Arade
in_cycle             yes
in_menu              yes

display Consoles
layout               Attrac-Man
romlist              Consoles
in_cycle             yes
in_menu              yes

display Handhelds
layout               Attrac-Man
romlist              Handhelds
in_cycle             yes
in_menu              yes

display Geneis
layout               Attrac-Man
romlist              Genesis
in_cycle             no
in_menu              no

display SMS
layout               Attrac-Man
romlist              SMS
in_cycle             no
in_menu              no

display GBA
layout               Attrac-Man
romlist              GBA
in_cycle             no
in_menu              no

display GBC
layout               Attrac-Man
romlist              GBC
in_cycle             no
in_menu              no

display SNK
layout               Attrac-Man
romlist              SNK
in_cycle             no
in_menu              no

display Nintendo_HH
layout               Attrac-Man
romlist              Nintendo_HH
in_cycle             no
in_menu              no

general
startup_mode         displays_menu

Title: Re: Multilevel menu
Post by: walknight on August 01, 2020, 11:38:22 AM
Thanks this is super helpful.
I might need more details in the Arcade section though.
So the Arcade section has the following structure:

Code: [Select]
Arcade
    All Games
    Genre
        Fighting
        Shoot 'em Up
        Beat 'em Up
        Platform
        Run 'n Gun
        Puzzle
        ...
    System
        Cave
        Gaelco
        PGM
        Psikyo
        ...       
    Collection
        Atari Classics
        Capcom Classics
        Data East Classics
        ...
       

Basically, each "leaf" display will be some filtered collection of the "MAME" romlist.

Also, how do I customize the videos and other arts when a "shortcut" display is highlighted? For example I want to play different videos and maybe show a TV box instead of an Arcade cab when user switches from Arcade to Consoles.
Title: Re: Multilevel menu
Post by: progets on August 01, 2020, 01:27:17 PM
For mame you would create "Global Filters" for each "Display" to only show what you want and they can all use the same mame romlist.

Shortcut artwork works the same as any other system. Just place your artwork named after the "Display" name you're using in the corresponding folders (flyer, fanart, snap, etc.) in /attract/menu-art.

I know people want their setup a particular way, and that's fine. I will say that AM's filtering is better than most (maybe all) other frontends and what your are trying to accomplish could be done much easier using just filters.
Title: Re: Multilevel menu
Post by: walknight on August 01, 2020, 04:19:50 PM
Thanks progets! Everything works beautifully as you suggested. I love this!

Couple of more questions:

Title: Re: Multilevel menu
Post by: progets on August 01, 2020, 06:56:51 PM
- As far as I know, it's not possible to directly change the menu-art path for the "Displays Menu". It can be done in the layout that you use. You can also use whatever path you want for all other "Displays. To use with other frontends your best choice is probably symbolic links.

- The easiest way to change all the layouts at once is by doing a find-and-replace on the attract.cfg file. In the GUI they need to be done one at a time.

- Yes, any display can use any layout. Any layout can also have any number of .nut files that can be toggled. This would allow shared use of resources/art but still give you the ability to have unique .nut files for any or every different display. There are some AM layouts that keep the same look and feel while being different for each system. Here's an exampe http://forum.attractmode.org/index.php?topic=1586.0 (http://forum.attractmode.org/index.php?topic=1586.0)

- Yes you could just use filters instead of menu layers to accomplish a similar effect. By default filters are on a plain scrolling menu using a flat level. To pretty it up would be code in the layout you're using. There are a few layouts that do this well. Each filter can have many fields and they are read in order so you can use this in many different ways. Filter artwork works the same as unfiltered artwork. To get good looking or layered filter lists would require code in the layout. Here's an example http://forum.attractmode.org/index.php?topic=481.msg5365#msg5365 (http://forum.attractmode.org/index.php?topic=481.msg5365#msg5365).

Take a look at the layout/theme gallery. Try some and find the once that's closest to what you want and then borrow pieces of other layouts code to shape/build your own ideal layout(s).
Title: Re: Multilevel menu
Post by: walknight on August 01, 2020, 08:26:09 PM
Awesome. Guess I'll learn along the way.
Thanks again for your help @progets.
Title: Re: Multilevel menu
Post by: akafox on August 04, 2020, 01:03:32 PM
Okay...now i want to do this whole thing backwards..

but it might be better to start a new thread. If you think it should go here then I will put it here...just let me know