Author Topic: Multilevel menu  (Read 4825 times)

walknight

  • Full Member
  • ***
  • Posts: 25
    • View Profile
Multilevel menu
« 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.

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Multilevel menu
« Reply #1 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;@;;;;;;;;;;;;;;;;;;
« Last Edit: July 31, 2020, 11:22:46 PM by progets »

walknight

  • Full Member
  • ***
  • Posts: 25
    • View Profile
Re: Multilevel menu
« Reply #2 on: July 31, 2020, 04:53:36 PM »
Thanks again, progets. Is there a full documentation where I can read all about this?

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Multilevel menu
« Reply #3 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)
People want life easy..then complain about it

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Multilevel menu
« Reply #4 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.
« Last Edit: August 01, 2020, 12:13:09 AM by progets »

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Multilevel menu
« Reply #5 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

« Last Edit: January 04, 2021, 10:07:25 PM by progets »

walknight

  • Full Member
  • ***
  • Posts: 25
    • View Profile
Re: Multilevel menu
« Reply #6 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.

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Multilevel menu
« Reply #7 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.

walknight

  • Full Member
  • ***
  • Posts: 25
    • View Profile
Re: Multilevel menu
« Reply #8 on: August 01, 2020, 04:19:50 PM »
Thanks progets! Everything works beautifully as you suggested. I love this!

Couple of more questions:

  • Is it possible to set each menu-art path outside of the config directory, like what can be done for rom path and rom arts? This way I can use different front ends with the same art collection.
  • I see each display has its own layout. So after setting up the whole menu structure, how do I easily switch from one layout to the other for all menu levels?
  • Following the previous question, I guess I can use different layout at different levels of the menu. Like display a full-screen video at "Arcade Genre" selection, but switch to a "attract-man" like layout at game selection. I'm still new to the layout design stuff. Is there such a concept of designing layout for different menu levels? So that the same look and feel is maintained across different menu levels.
  • As you mentioned, the same functionality this menu structure provides can also be implemented by filters. So I could create an Arcade display that uses the MAME romlist, then create filters by genre, by manufacturer, by control type, by year, ..., etc. But when switching among these filters, are they all on the same flat level, or is there a way to organize them into different levels? Like genre filters, manufacturer filters, etc. Or even some way to combine (AND) some filters without configuring a new filter? Also how is filter related art handled? Is it possible to display a scrolling list of available filters, maybe with their logos?

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Multilevel menu
« Reply #9 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

- 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.

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).
« Last Edit: August 01, 2020, 08:21:58 PM by progets »

walknight

  • Full Member
  • ***
  • Posts: 25
    • View Profile
Re: Multilevel menu
« Reply #10 on: August 01, 2020, 08:26:09 PM »
Awesome. Guess I'll learn along the way.
Thanks again for your help @progets.

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Multilevel menu
« Reply #11 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
People want life easy..then complain about it