Author Topic: Layout To Load Other Layouts  (Read 1318 times)

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 240
    • View Profile
    • Idaho Garagecade
Layout To Load Other Layouts
« on: January 29, 2019, 08:00:31 AM »
I am almost sure this has been asked and answered before,  but my SearchFu stinks and I can't find it.

I would like to create a layout that has a menu of other layouts of which to choose from.  When choosing,  it would load the other layout,  but with the ability to exit back to the first (or re-load the first)...

Currently I have a dedicated button that switches between themed layouts... but it would be nice to have a centralized menu to choose,  for example "Daphne, CPS1, CPS2, IREM" etc... which would load each individual layout... then just a button to switch back to the initial menu.

I believe categories work this way,  but I do NOT want to have to modify/edit my romlists,  which I do believe is a requirement to use categories.

I imagine I would need code to load the other menus and then a small but of code that I would have to add to each of my "themed" layouts to load the main menu back?

Ideas?
Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

rand0m

  • Sr. Member
  • ****
  • Posts: 218
    • View Profile
Re: Layout To Load Other Layouts
« Reply #1 on: January 29, 2019, 09:48:24 PM »
1- Displaymenu does function in this manner A (select) will load the layout and B(escape/ cancel) will take you back one level to Displaymenu.

2- For CPS1/ CPS2 etc you can exclude the titles from mame romlist filter (i.e. manufacturer not contains/ equal CPS etc) while pointing them to filters of required systems (i.e.for CPS2, manufacturer contains CPS2) - This will keep your romlist intact, doing all the work through filters. So e.g. CPS will display only CPS titles, CPS2 will only display CPS2 and so on. Or u can display all titles in mame and also separately (rule of thumb is to have one title display only once unless using collections)

It prolly sounds more complicated then it is :D

 
« Last Edit: January 29, 2019, 11:26:24 PM by rand0m »

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 240
    • View Profile
    • Idaho Garagecade
Re: Layout To Load Other Layouts
« Reply #2 on: January 30, 2019, 06:43:09 AM »
I am at a loss as to where I can find the code for displaymenu?


I am assuming you're referring to the actual code for poking through and adding displays,  emulators, etc?


Any idea where I can find this code?
Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

rand0m

  • Sr. Member
  • ****
  • Posts: 218
    • View Profile
Re: Layout To Load Other Layouts
« Reply #3 on: January 30, 2019, 07:18:58 AM »
DisplaysMenu is inbuilt into AM

1) Go to AM > Settings > Startup Mode > select 'Displays Menu'

2) Then go to AM > Settings > Displays > 'Displays Menu' Options > Menu Style (select layout) select some other layout/ theme then your main.

Now you can change the look/ feel/ code of layout theme for Displays Menu - your systems will be listed here and will operate in the manner you listed above in opening post. displaysmenu will list all systems in attract.cfg, there is some other fine tuning but that can wait.

PS: I got a working displaysmenu in here (only the last part, sega saturn is a different layout): https://www.youtube.com/watch?v=cEAhZQLsCho 

PS: I think like me you mix-up between displaysmenu and displaymenu too :D
« Last Edit: January 30, 2019, 07:26:07 AM by rand0m »

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 240
    • View Profile
    • Idaho Garagecade
Re: Layout To Load Other Layouts
« Reply #4 on: January 30, 2019, 08:47:09 AM »
Hmmm... following your instructions and just changing startup to DISPLAYS MENU and then changing the DISPLAYS MENU to one of my themes (working) to test...

...I now load,  get attract mode video,  then crash to desktop.

:(

Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 240
    • View Profile
    • Idaho Garagecade
Re: Layout To Load Other Layouts
« Reply #5 on: January 30, 2019, 08:49:24 AM »
I modified the cfg file and changed to Attrac-man... it now doesn't crash,  but none of the 4 displays I have setup are showing up in attrac-man.

Could I setup a layout using do_nut to load other layouts?  But how to list the current list of displays though...

Hmmm...

Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 240
    • View Profile
    • Idaho Garagecade
Re: Layout To Load Other Layouts
« Reply #6 on: January 30, 2019, 08:51:54 AM »
This may help...

...I want to do something similar to this:

https://vimeo.com/282042530

I'd like to setup a dedicated PAC screen/layout.... a dedicated CPS1.... a dedicated Galaga... like you see in the video...

Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

rand0m

  • Sr. Member
  • ****
  • Posts: 218
    • View Profile
Re: Layout To Load Other Layouts
« Reply #7 on: January 30, 2019, 08:00:47 PM »
1- In your attrcat.cfg, systems should be listed like this:
Code: [Select]
display Atari 2600 (Stella)
layout               Chicuelo-WIP
romlist              Atari 2600 (Stella)
in_cycle             yes
in_menu              no
filter               ALL
sort_by              Title
If the parts about in_cycle and in_menu are missing then add them (please make a backup of attrcat.cfg before that) and check.

2- In the video, looks like collections are being used, you can do that in two ways. DisplaysMenu and using Tags/Displays. Displays Menu is discussed ^ For tags/Displays you have to:

a) Open MAME and create a tag on any CPSI game (Tags control can be Configured from AM > Controls). Tag can be named anything, lets name it CPSI. This will create a file in AM\Romlists\[MAME]\CPSI.tag. Opening this file will show you the [NAME] of file you created tag for.

b) go to AM > Displays > Add new dsiplay > Name it anything (like CPSI). Then fill the rest of details, in Collection/Romlist Select your main MAME romlist (exactly as you have named it - as it is in AM\romlists\[MAME].txt). In global filter > rule > Target = Tags, Comparison = contains, Filter Value = CPSI.

c) This should create a new Display CPSI, which will list a single game you tagged. If the game is there and display is working as expected you can use an app like romlister to make txt files of all CPSI titles (or get a list from internet) the .tag file only lists a single [NAME] in single line. If you like the results you can add the rest of displays following the same method.
 

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 883
    • View Profile
Re: Layout To Load Other Layouts
« Reply #8 on: January 30, 2019, 08:40:17 PM »
1- In your attrcat.cfg, systems should be listed like this:
Code: [Select]
display Atari 2600 (Stella)
layout               Chicuelo-WIP
romlist              Atari 2600 (Stella)
in_cycle             yes
in_menu              no
filter               ALL
sort_by              Title
If the parts about in_cycle and in_menu are missing then add them (please make a backup of attrcat.cfg before that) and check.

2- In the video, looks like collections are being used, you can do that in two ways. DisplaysMenu and using Tags/Displays. Displays Menu is discussed ^ For tags/Displays you have to:

a) Open MAME and create a tag on any CPSI game (Tags control can be Configured from AM > Controls). Tag can be named anything, lets name it CPSI. This will create a file in AM\Romlists\[MAME]\CPSI.tag. Opening this file will show you the [NAME] of file you created tag for.

b) go to AM > Displays > Add new dsiplay > Name it anything (like CPSI). Then fill the rest of details, in Collection/Romlist Select your main MAME romlist (exactly as you have named it - as it is in AM\romlists\[MAME].txt). In global filter > rule > Target = Tags, Comparison = contains, Filter Value = CPSI.

c) This should create a new Display CPSI, which will list a single game you tagged. If the game is there and display is working as expected you can use an app like romlister to make txt files of all CPSI titles (or get a list from internet) the .tag file only lists a single [NAME] in single line. If you like the results you can add the rest of displays following the same method.

rand0m is correct about this being the correct/best/easiest way to get your desired function without reinventing the wheel. Depending on what you want you might also need to manually create your romlists for the submenus.

This thread might help you understand it better but it's old and the plugin mentioned there isn't needed since it's now built into Attract Mode http://forum.attractmode.org/index.php?topic=1804.msg12653#msg12653
« Last Edit: January 30, 2019, 08:43:49 PM by progets »

gunthermic

  • Full Member
  • ***
  • Posts: 26
    • View Profile
Re: Layout To Load Other Layouts
« Reply #9 on: January 30, 2019, 11:31:35 PM »
DisplaysMenu is inbuilt into AM

1) Go to AM > Settings > Startup Mode > select 'Displays Menu'

2) Then go to AM > Settings > Displays > 'Displays Menu' Options > Menu Style (select layout) select some other layout/ theme then your main.

Now you can change the look/ feel/ code of layout theme for Displays Menu - your systems will be listed here and will operate in the manner you listed above in opening post. displaysmenu will list all systems in attract.cfg, there is some other fine tuning but that can wait.

PS: I got a working displaysmenu in here (only the last part, sega saturn is a different layout): https://www.youtube.com/watch?v=cEAhZQLsCho 

PS: I think like me you mix-up between displaysmenu and displaymenu too :D

I have tried this on the ARpiCADE on my PI3B, and it never changes the DisplayMenu.. I change to all other kinds of themes(layouts) and it never changes.

rand0m

  • Sr. Member
  • ****
  • Posts: 218
    • View Profile
Re: Layout To Load Other Layouts
« Reply #10 on: January 31, 2019, 03:41:09 AM »
DisplaysMenu is inbuilt into AM

1) Go to AM > Settings > Startup Mode > select 'Displays Menu'

2) Then go to AM > Settings > Displays > 'Displays Menu' Options > Menu Style (select layout) select some other layout/ theme then your main.

Now you can change the look/ feel/ code of layout theme for Displays Menu - your systems will be listed here and will operate in the manner you listed above in opening post. displaysmenu will list all systems in attract.cfg, there is some other fine tuning but that can wait.

PS: I got a working displaysmenu in here (only the last part, sega saturn is a different layout): https://www.youtube.com/watch?v=cEAhZQLsCho 

PS: I think like me you mix-up between displaysmenu and displaymenu too :D

I have tried this on the ARpiCADE on my PI3B, and it never changes the DisplayMenu.. I change to all other kinds of themes(layouts) and it never changes.

That shouldn't be happening, does console register any errors (or last_run.log)

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 883
    • View Profile
Re: Layout To Load Other Layouts
« Reply #11 on: January 31, 2019, 12:17:43 PM »
I have tried this on the ARpiCADE on my PI3B, and it never changes the DisplayMenu.. I change to all other kinds of themes(layouts) and it never changes.

Configure-->General-->Startup Mode=Show Displays Menu

rand0m

  • Sr. Member
  • ****
  • Posts: 218
    • View Profile
Re: Layout To Load Other Layouts
« Reply #12 on: February 08, 2019, 02:17:41 AM »
Hmmm... following your instructions and just changing startup to DISPLAYS MENU and then changing the DISPLAYS MENU to one of my themes (working) to test...

...I now load,  get attract mode video,  then crash to desktop.

:(

I just realized that you might be missing the [Emulator] value in displaysmenu romlists. In Am/romlists/DisplaysMenu.txt the [Emulator] value for each item must be @

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 240
    • View Profile
    • Idaho Garagecade
Re: Layout To Load Other Layouts
« Reply #13 on: February 08, 2019, 06:40:06 AM »
Hmmm... following your instructions and just changing startup to DISPLAYS MENU and then changing the DISPLAYS MENU to one of my themes (working) to test...

...I now load,  get attract mode video,  then crash to desktop.

:(

I just realized that you might be missing the [Emulator] value in displaysmenu romlists. In Am/romlists/DisplaysMenu.txt the [Emulator] value for each item must be @

OK... things actually work ...

:)

However,  of course,  only a text NAME for each emulator comes up.  How do I assign a "snap" or "wheel" image for each emulator name?  I tried naming an image "MAME" (to match my test display name) and put it in the proper snaps folder... nope... proper marquees folder... nope...  ALSO,  how do I get BACK to the display screen once I select a display.

Thanks!
Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 240
    • View Profile
    • Idaho Garagecade
Re: Layout To Load Other Layouts
« Reply #14 on: February 08, 2019, 07:01:27 AM »
OK... figured this out... art goes in the "menu-art" folder of AM... not the location of the emulator in question.

Now,  to figure out how to get BACK to the display screen (I'm sure it's easy...)

Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)