Author Topic: Help Understand theme creation  (Read 3983 times)

Billyc666

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Help Understand theme creation
« 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


rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: Help Understand theme creation
« Reply #1 on: January 24, 2020, 08:30:27 AM »
Calling System Artwork
If the items are not in a romlist e.g. systems you can call them via something like:
Code: [Select]
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:
Code: [Select]
//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;


Billyc666

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Help Understand theme creation
« Reply #2 on: January 24, 2020, 08:49:52 AM »
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


rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: Help Understand theme creation
« Reply #3 on: January 24, 2020, 09:22:54 AM »
These pngs point to following:
Code: [Select]
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:
Code: [Select]
local obj = surface.add_image( "images/logo/[Title] - logo.png" )

Billyc666

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Help Understand theme creation
« Reply #4 on: January 24, 2020, 09:51:27 AM »
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

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: Help Understand theme creation
« Reply #5 on: January 24, 2020, 08:33:01 PM »
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.

Billyc666

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Help Understand theme creation
« Reply #6 on: January 25, 2020, 12:54:53 PM »
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?
« Last Edit: January 25, 2020, 12:58:59 PM by Billyc666 »

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: Help Understand theme creation
« Reply #7 on: January 26, 2020, 10:12:35 AM »
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

Billyc666

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Help Understand theme creation
« Reply #8 on: January 27, 2020, 10:25:07 AM »
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.
« Last Edit: January 28, 2020, 06:55:33 AM by Billyc666 »

Billyc666

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Help Understand theme creation
« Reply #9 on: January 31, 2020, 01:13:42 PM »
is  there a way to skew rotate warp artwork like this

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Help Understand theme creation
« Reply #10 on: January 31, 2020, 01:35:49 PM »
There are both skew and rotate options. Look at this thread http://forum.attractmode.org/index.php?topic=3201.msg22592#msg22592.

Billyc666

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Help Understand theme creation
« Reply #11 on: January 31, 2020, 02:14:48 PM »
Thank you, i think its pinch and skew