Attract-Mode Support Forum
Attract-Mode Support => General => Topic started by: Billyc666 on January 24, 2020, 07:54:49 AM
-
Hoping some one can help, im trying to understand how theming works, i was looking at the layout file for miflat theme which is horizontal scroll main menu
but i dont see how the layout is calling the artwork for the wheels or how the list is set horizontal, basically i just want to mess with an idea for a main menu theme similar to the image below but have no understanding of how it works (Yet)
the them would be simiilar but not the same as the image and comprise of
System based background ( ie.n64.png, atari2600.png, ect)
System based image (Wheel) during selection
System based video
and 2 bar.pngs (Semi transparent)
i wasnt sure if this could be made with am builder as i couldnt find a way to do horizontal scroll list(wheels)
any help much apreciated, once i get the hang of it i will be ok
-
Calling System Artwork
If the items are not in a romlist e.g. systems you can call them via something like:
local sys_bg = fe.add_image("images/sysbackground/[Name].png", 0, 0, 0, 0);
local sys_flyers = fe.add_image("images/sysflyer/[Name].png", 0, 0, 0, 0);
local sys_wheels = fe.add_image("images/syswheels/[Name].png", 0, 0, 0, 0);
Make sure that in layout-name/images you have these folders where images are named exactly like the system. You can also achieve something similar by utilizing menu-art but I found the above mentioned way more organized and easier for sharing.
Horizontal Scrolling
There are many ways to do this but I found Oomek's carrier.nut to be the easiest way to achieve an ES like functionality. Its very easy to use, try something like:
//Load Carrier
fe.do_nut("scripts/carrier.nut");
//Systems List
local carrier = Carrier( 0, 330, 1920, 400, 3, 3, 50, "pixel.png","pixel.png");
carrier.set_keep_aspect();
carrier.surfacePosSmoothing = 0.9;
-
Thank you that makes sense, just one question was pixel.png as demonstartion or is that needed for the horizontal scroll list to use images from wheel folder
-
These pngs point to following:
local carrier = Carrier( 0, 400, 1920, 300, 5, 3, 20, "selector.png", "background.png" )
Since for the layout (a port of ArtBook ES theme) I wanted a blank selector and background I placed a 1x1 blank png there. One thing though carrier.nut has "local obj = surface.add_artwork( "snap" )" hard-coded on line 132. If you want to use anything else you need to edit carrier.nut and change that e.g. I was using the following:
local obj = surface.add_image( "images/logo/[Title] - logo.png" )
-
Thank you very much apreciated, before i begin. is it best too use am builder or use a similar theme and edit the layout
im assuming a similar layout and trying to figure each section of codes function
-
Thank you very much apreciated, before i begin. is it best too use am builder or use a similar theme and edit the layout
im assuming a similar layout and trying to figure each section of codes function
urw. I'd suggest creating a very simple vertical layout first, one example is given in wiki. Then move your way to more complex setups. Am builder is an excellent tool, having some prior knowledge about layouts will help you a lot in better utilizing it.
-
Thanks rand0m, ive been reading a bit of the forum today, than made a quick mockup in PS, this would be just main menu as i had another idea for game menus
can favourites for system be called from main menu before entering into the games menu?
-
Favorites are system specific unless you are using a unified list or you need to create a substitute function which creates favorites and stores them is some other romlist. Great job on the theme :D
-
Thank you, ive been experementing with the code and getting the hang of it through what you wrote and through snippets off the forum and from the pre made themes.
-
is there a way to skew rotate warp artwork like this
-
There are both skew and rotate options. Look at this thread http://forum.attractmode.org/index.php?topic=3201.msg22592#msg22592 (http://forum.attractmode.org/index.php?topic=3201.msg22592#msg22592).
-
Thank you, i think its pinch and skew