Attract-Mode Support Forum
Attract-Mode Support => Themes => Topic started by: flaviobello on April 21, 2016, 07:16:46 PM
-
Hi all! i just discovered this awesome frontend. and i'm moving from hyperspin.
i just made a layout but i face a issu i can't fi. the order of objects, as you can see in the attached image, the logo (wheel) is in front of the video, as it suposed to be, but i can't put this object in front of background. i'm trying to user zorder but it's not working. any ideas?
thanks in advance!
-
Stuff will get displayed on the screen in the order that the script is parsed by AM.
In your layout file, is your declaration for the border image around the screenshot AFTER the declaration for the wheel artwork?
-
i just made the theme using the simple one.
i'll post the code here.
thks for the help man
//
// Attract-Mode Front-End - "Arcade" sample layout
//
fe.layout.width=1920;
fe.layout.height=1080;
local t = fe.add_artwork( "snap", 990, 200, 890, 700 );
t.trigger = Transition.EndNavigation;
t = fe.add_artwork( "marquee", 1533, 72, 347, 95 );
t.trigger = Transition.EndNavigation;
t = fe.add_artwork( "wheel", 1512, 920, 360, 160 );
t.trigger = Transition.EndNavigation;
t.zorder = 1
local l = fe.add_listbox( 25, 190, 920, 810 );
l.charsize = 28;
l.rows = 20
l.set_rgb( 100, 100, 100 )
l.set_sel_rgb( 255, 255, 255 );
l.set_selbg_rgb( 0, 0, 0 )
// l.sel_style = Style.Bold;
l.align = Align.Left;
local l = fe.add_image( "bg.png", 0, 0 );
l.zorder = 9
// l = fe.add_text( "[DisplayName]", 0, 15, 640, 30 );
// l.set_rgb( 0, 0, 0 );
// l.style = Style.Bold;
l = fe.add_text( "[Year] [Manufacturer]", 38, 1020, 320, 16 );
l.set_rgb( 255, 255, 255 );
l.align = Align.Left;
l = fe.add_text( "Played [PlayedCount] Times", 400, 1020, 320, 16 );
l.set_rgb( 255, 255, 255 );
l.align = Align.Left;
l = fe.add_text( "[ListEntry]/[ListSize]", 655, 1020, 290, 16 );
l.set_rgb( 255, 255, 255 );
l.align = Align.Right;
-
I'm thinking you bg.png is what you want in the background, so put this early in your code:
fe.layout.width=1920;
fe.layout.height=1080;
local l = fe.add_image( "bg.png", 0, 0 );
-
I'm really not familiar with using the zorder property, but after doing some tests on my own, I'm not so sure it is working as you would expect it to.
I'd recommend you move fe.add_image( "bg.png", 0, 0 ) to the start of the file so it is drawn first. With a layout script like this, where you're just drawing a bunch of objects one after the other, the zorder will go in the order you've written the script from top to bottom. ie:
background = fe.add_image(...)
middle = fe.add_image(...)
front = fe.add_image(...)
background will be drawn first, then middle on top of that, then front will be drawn over the top of that.
-
flaviobello-
Chris gave you an excellent explanation. To simplify it even more, you're basically stacking images one on top of another, layering if you will.
This is your draw order. So, in your case the bg is the beginning of the stack - the first to be drawn. Then you stack the snap, marquee, and wheel art on top of it - the 2nd, 3rd, 4th to be drawn etc...
Don't bother with that z order crap.
-
thank a lot for the help!! i'll try this tips.
i'll post result.
cheers!
[edit]
thanks a lot guys, now it's fixed, and i learn a lot on layer order.
-
I like it...I like the icon at top right too.