Attract-Mode Support Forum

Attract-Mode Support => Themes => Topic started by: mahuti on January 08, 2021, 06:27:17 PM

Title: Verted -- Layout for Vertical Cabinets
Post by: mahuti on January 08, 2021, 06:27:17 PM
Verted Layout


Can be downloaded here: https://github.com/mahuti/Verted

This layout is intended primarily for vertical cabinets, but can be used for different sized screens. This layout will scale to any size, but is intended for use on vertical cabinets. This theme includes tabs to show snaps, flyers, cabinets, and history info (requires history.dat plugin be installed, configured, and enabled)

This layout is based off of a previous theme called "The Invaders", though largely uses different code. Primary differences from the original include bug fixes, the ability to show or hide the games list, improved tab interface with options to show/hide tabs and will disable tabs without content on a per-game basis, dynamic scaling, and selectable colors for bezel and tabs. The design is basically the same, but the code is nearly all new. I started using The Invaders theme on my cabinet, but I wanted some more flexibility, and I wanted a reason to fine-tune my Pos (dynamic positioning) module. Also, the original had some font-stretching due to differences in the sizes of my vertical monitors versus the layout. This version will scale fonts rather than stretch them.

Requirements

1. Add the animate2 and pos modules to AttractMode's modules folder.
Though I've included those 2 modules:
You can find the latest version of the animate2 module here: https://github.com/liquid8d/attract-extra/tree/master/modules
The latest version of the Pos module can be found here: https://github.com/mahuti/Pos-Module

2. You'll need to have artwork set up for the following: cabinet, flyer, marquee, snap, wheel if you want to use all of the functionality

3. To use the History/Info tab, take a look at the setup instructions under the "Show History Info Tab" instructions below

Options

Show Games list

Off by default

If enabled, shows list of games on the left-hand side.



Tabs

The tabs feature requires custom1 control be configured in AttractMode. To add a custom control go to: AttractMode Settings > controls > custom1 > add input. Once the input has been added, you can use this control to select available tabs. Tabs that have been enabled, but do not have content will be dimmed and unselectable

Show History Info Tab
Off by default

If enabled, shows the History/Info tab. To use this feature:

1. History.dat plugin must be enabled and working.
2. You must generate the History.dat plugin's index. After generating the index the first time, you may need to restart AttractMode
3. You must set the history.dat location in the layout options (even though it's already set up in the history.dat plugin)
 
Show Flyers Tab

Enabled by default

If enabled, shows the Flyer tab

Show Cabinets Tab

Enabled by default

If enabled, shows the Cabinets tab

Bezel Style/Color

This sets the colors for the bezel and the tabs. The bezel is the image that wraps around the snap image.



Blink the PLAY NOW graphic

When set to yes, the play now graphic will pulse

Scaling

Controls how the flyers & cabinet artwork should be scaled. Stretch will fill the entire space. Scale will scale up/down to fit the space.

Rotate

Controls how the layout should be rotated



Credit to: "The Invaders" by MarkC74,  with enhancements by FrizzleFried, ArcadeBliss and others... original posting: http://forum.attractmode.org/index.php?topic=2120.0 for the layout and concepts, animation, and more.

Also, this theme uses some of the history.dat code from here: http://forum.attractmode.org/index.php?topic=643.0

 
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: jedione on January 09, 2021, 06:46:35 AM
i am getting this.." the index 'charsize' does not exist"

Title: Re: Verted -- Layout for Vertical Cabinets
Post by: mahuti on January 09, 2021, 09:36:04 AM
Frustrating... oops. I included the wrong version of the pos module. I've updated the link with the working version. Sorry about that.
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: jedione on January 09, 2021, 05:49:53 PM
thanks....will try out
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: mahuti on January 09, 2021, 05:54:22 PM
I'm interested to see if the scaling works well across different screen sizes. I tested it across a handful of sizes and screen depths here, but there is nothing like putting something into production to work the bugs out.

"I don't often test.... but when I do, I do it in production"  ;D
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: mahuti on January 09, 2021, 09:16:38 PM
Just noticed after exiting a game there is a bug now with the displaying history on my arcade cabinet. I'll check local. Should be a quick fix, up until the last day or so it worked.
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: markc74 on January 26, 2021, 08:44:10 AM
That's some nice changes you made. I never ended up using it in my cab but did like the layout. I might come back to it as some point (using your code as it's nicer  ;D)
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: mahuti on January 26, 2021, 01:20:51 PM
Thanks. I'm still tweaking it. Oomek is talking about 9-patch scaling for rounded corners, but I might implement something similar myself in the short term. I really hate the stretched rounded corners I look at while testing it on a widescreen. Meantime I'm also working on automatic history scrolling. About 90% working so far.

Title: Re: Verted -- Layout for Vertical Cabinets
Post by: SpoonyAllen on January 29, 2021, 09:39:10 AM
I was actually making my own theme based on my old vertical hyperspin project. While doing research i found your theme. It's great so far. One thing. I'm not sure if i'm doing this correct but i parsed the history dat and made a custom control1. the tab does pan but i don't see any history info. the area is blank. I can see scrapped arcade flyers.

If i could suggest one thing, perhaps adding the ability to remove the category and possibly add the ability to add the game title and manufacturer info at the bottom left would be nice. Sometimes the genre of the game is pretty obvious. Also sometimes the logo doesn't exactly make it aware of what the game is. Its also impossible to know what game it is if you're missing the game wheel.
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: mahuti on January 29, 2021, 01:24:16 PM
Make sure the history plug-in is enabled in AM'S plug-in menu, and the path to the generated dat is also set up in the layouts options.

I agree on the other items you mentioned. Hadn't gotten around to it but they are super easy additions that I'll make sometime today or so.
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: SpoonyAllen on January 29, 2021, 02:54:47 PM
Make sure the history plug-in is enabled in AM'S plug-in menu, and the path to the generated dat is also set up in the layouts options.

I agree on the other items you mentioned. Hadn't gotten around to it but they are super easy additions that I'll make sometime today or so.

I just figured it out. apparently the theme does not like using relative paths with variables. I was using $PROGDIR\mame\dats\history.dat where the theme wanted the full path to the history.dat.
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: mahuti on January 29, 2021, 05:57:36 PM
The theme just passes it along... maybe I'd have to add parsing for this gs like home and progdir. I wish I could just pull the path directly from the history plug-in.  I'll ask OOMek and see if its possible
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: P47 on January 30, 2021, 07:14:27 AM
Very nice, just what i need for my cabinet... thk.

PS - Option for Automatic hide game list past 12 or 2 seconds ;) 
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: mahuti on January 30, 2021, 06:24:40 PM
I'll take a look.
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: P47 on January 31, 2021, 02:39:04 AM
Thanks, and if it is not to ask for more, a information of system are really good too.  (Mame, FBA, Favorites, etc)
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: mahuti on January 31, 2021, 06:42:53 PM
What information do you want to see you mentioned Emulator Name and Favorite Status... and Etc. What is included in "Etc"  ;D
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: verion on February 01, 2021, 03:47:12 PM
I was wondering if I'd be able to adopt your code to my BIONIC THEME design that I have laying in a bottom drawer for some time.

this is a video
https://www.facebook.com/watch/?v=653130338481660

this is a AM forum thread
http://forum.attractmode.org/index.php?topic=2903.0

Looks like it's more-or-less the same, not visually, but structurally. So maybe I can just get by with replacing overlays and moving objects around. This should be simple enough. I type of element from my design that is absent in your layout - is the frame around the game list. Do you think I can easily add an image overlay to the set of game list elements? So it will hide with the game list on a tab change.
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: SpoonyAllen on February 09, 2021, 09:59:18 AM
i noticed that this theme will cause AM to crash from time to time when scrolling through videos. It happens about once every 10 bootups. i've had it happen on both windows 7 and win10.
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: mahuti on February 09, 2021, 05:19:29 PM
Do you have history plug-in enabled?

I haven't seen it crash yet on win 10 or pi. Probably some configuration difference i need to account for. If you have any logs with errors let me know and I'll be happy to sort it out.
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: SpoonyAllen on February 11, 2021, 04:30:30 PM
Do you have history plug-in enabled?

I haven't seen it crash yet on win 10 or pi. Probably some configuration difference i need to account for. If you have any logs with errors let me know and I'll be happy to sort it out.

 Here is my last_run.log

Code: [Select]
Attract-Mode v2.6.1 (Windows, SFML 2.5.1 +SWF +7z +Curl)
avcodec 58.54.100 / avformat 58.29.100 / swscale 5.5.100 / avutil 56.31.100 / swresample 3.5.100

Config: C:\AMV\attract.cfg

*** Initializing display: 'mame'
 - Loaded master romlist 'mame' in 108 ms (2589 entries kept, 0 discarded)
 - Constructed 3 filters in 20 ms (7767 comparisons)

xconv: 1.6

yconv: 2.13438

xconv: 1.6

yconv: 1.6

RELATIVE XY:
message:
type: x
anchor: middle
align_to: (null : 0x00000000)
screen WxH: 768 x 1366
num: 0
object_xy:0
object_wh:716
relative_object_xy: 0
relative_object_wh: 716
new xy coord: 0

RELATIVE XY:
message:
type: y
anchor: middle
align_to: (null : 0x00000000)
screen WxH: 768 x 1366
num: 0
object_xy:0
object_wh:1126
relative_object_xy: 0
relative_object_wh: 1126
new xy coord: 0

RELATIVE XY:
message:
type: x
anchor: middle
align_to: (null : 0x00000000)
screen WxH: 768 x 1366
num: 0
object_xy:160
object_wh:716
relative_object_xy: 0
relative_object_wh: 716
new xy coord: 0

RELATIVE XY:
message:
type: y
anchor: middle
align_to: (null : 0x00000000)
screen WxH: 768 x 1366
num: 55.4938
object_xy:136
object_wh:913
relative_object_xy: 0
relative_object_wh: 1126
new xy coord: 161.994

RELATIVE XY:
message: PLAY NOW!!!
type: x
anchor: right
align_to: (null : 0x00000000)
screen WxH: 768 x 1366
num: -64
object_xy:588
object_wh:208
relative_object_xy: (null : 0x00000000)
relative_object_wh: (null : 0x00000000)
new xy coord: 496

RELATIVE XY:
message: [!alphafirst]
type: x
anchor: left
align_to: (null : 0x00000000)
screen WxH: 768 x 1366
num: 12.8
object_xy:28
object_wh:28
relative_object_xy: 27
relative_object_wh: 76
new xy coord: 39.8
 - Loaded layout: C:\AMV\layouts/Verted/ (layout.nut)

RELATIVE XY:
message: [!alphafirst]
type: y
anchor: middle
align_to: (null : 0x00000000)
screen WxH: 768 x 1366
num: 4.8
object_xy:559
object_wh:35
relative_object_xy: 300.146
relative_object_wh: 76
new xy coord: 325.446

RELATIVE XY:
message: [!alphafirst]
type: y
anchor: middle
align_to: (null : 0x00000000)
screen WxH: 768 x 1366
num: 4.8
object_xy:325.446
object_wh:35
relative_object_xy: 300.146
relative_object_wh: 76
new xy coord: 325.446

RELATIVE XY:
message: [!alphafirst]
type: y
anchor: middle
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: P47 on February 13, 2021, 08:11:17 AM
What information do you want to see you mentioned Emulator Name and Favorite Status... and Etc. What is included in "Etc"  ;D

Emulator Name (Mame or FBA or Mame Libretro) it is for varios collections of roms. It is the same in other themes.

When i change the collections there is no name visible that indicate this is Mame Roms or Favorite roms for example.
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: mahuti on February 13, 2021, 10:30:08 AM
Good suggestion
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: mjnman on April 09, 2021, 01:24:29 AM
Thanks for the theme. I like and use it.
There is a little bug when switch from "Video" to "Flayer", "Info" ecc. The game list disappears when go down or go up.
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: mahuti on April 09, 2021, 09:03:30 AM
I'll check my local. I feel like at some point I dealt with a few similar issues.
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: mjnman on April 09, 2021, 02:23:50 PM
Thank you....It would be interesting if there is a left side of the custom1 command.  :P...maybe custom2  :-*
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: SpoonyAllen on April 25, 2021, 08:02:22 AM
Thanks for the theme. I like and use it.
There is a little bug when switch from "Video" to "Flayer", "Info" ecc. The game list disappears when go down or go up.

i had this same issue
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: bjhille on January 16, 2022, 05:29:34 PM
Is this layout being worked on or supported any longer?  I'm working on setting it up and I'm impressed. 

I found the same bug as others (if you scroll up or down while on the other tabs the game list disappears).  - I got this sorted out.  It was an easy fix (add "show_games_list()" in the play_video_tab() function as the last statement in the first if statement).

I know the custom 1 button advances the tabs at the bottom, is there a way to go back?  In other words, I wanted to use the joystick up and down to select the game, but the left and right to navigate the tabs.  Is this possible?  I found the code in the layout.nut and have modified it to accept "custom2", but actually going backwards through the tabs is more challenging.  It goes backwards once, then goes forward again....

Thanks.  Brian
Title: Re: Verted -- Layout for Vertical Cabinets
Post by: bjhille on January 17, 2022, 06:29:34 AM
In case anyone is interested....

I updated the .nut file.  The disappearing game list is fixed and I got "custom2" to work to go backwards through the tabs as well.

Two issues remain which I could use help figuring out:
* random crashes - when scrolling it sometime crashes out of AM.  Same issue as the original nut file.
* sometimes when you start AM, the game list is hidden.  Need to scroll to a tab and back to restore.  Same issue as the original file.  I can't seem to figure this one out.

Thanks.  Brian