hey mahuti,
These look great! You can easily start implementing multiple aspects if you store your values for each aspect in a table. Here is an example with the neogeo pocket one:
//
// NeoGeo Pocket
// Theme by Mahuti
//
class UserConfig {
</ label="Aspect", help="Aspect to use", order=1, options="4x3,16x9" />
aspect="4x3";
</ label="Enable Logos", help="If wheel images/logos aren't used, game titles will be shown instead.", order=1, options="show logos, show titles" />
enable_logos="show logos";
}
local config = fe.get_config();
local flw = fe.layout.width;
local flh = fe.layout.height;
local settings = {
"4x3": {
bg = { x = 0, y = 0, width = flw, height = flh },
snap = { x = flw * 0.327, y = flh * 0.238, width = flw * 0.3437, height = flh * 0.43 },
wheel = { x = flw * 0.75, y = flh * 0.88, width = flw * 0.2, height = flh * 0.1 },
title = { x = 0, y = flh * 0.92, width = flw, height = flh * 0.1 },
playtime = { x = flw * 0.01, y = flh * 0.93, width = flw * 0.4, height = flh * 0.1 },
scanlines = { x = flw * 0.327, y = flh * 0.238, width = flw * 0.3437, height = flh * 0.43 }
}
}
//Background
local bg = fe.add_image("bg.jpg", settings[aspect].bg.x, settings[aspect].bg.y, settings[aspect].bg.width, settings[aspect].bg.height);
// Snap
local snap = fe.add_artwork("snap", settings[aspect].snap.x, settings[aspect].snap.y, settings[aspect].snap.width, settings[aspect].snap.height);
snap.trigger = Transition.EndNavigation;
if ( config["enable_logos"] == "show logos" )
{
// wheel
local wheel = fe.add_artwork("wheel", settings[aspect].wheel.x, settings[aspect].wheel.y, settings[aspect].wheel.width, settings[aspect].wheel.height);
wheel.preserve_aspect_ratio = true;
wheel.trigger = Transition.EndNavigation;
wheel.zorder=100;
wheel.alpha = 140;
} else {
// Title
local title = fe.add_text("[Title]", settings[aspect].title.x, settings[aspect].title.y, settings[aspect].title.width, settings[aspect].title.height);
title.align = Align.Right;
title.charsize = 24;
title.set_rgb(247, 35, 0);
title.font = "Pretendo";
}
// Playtime
local playtime = fe.add_text("Playtime : [PlayedTime]", settings[aspect].playtime.x, settings[aspect].playtime.y, settings[aspect].playtime.width, settings[aspect].playtime.height);
playtime.align = Align.Left;
playtime.charsize = 20;
playtime.set_rgb(255, 255, 255);
// Scanlines
local scanlines = fe.add_image("scanlines.png", settings[aspect].scanlines.x, settings[aspect].scanlines.y, settings[aspect].scanlines.width, settings[aspect].scanlines.height );
scanlines.preserve_aspect_ratio = false;
scanlines.alpha = 130;
Notice, all I did was add a setting for aspects, created a table with all the values you had, then instead of hardcoding the values when creating objects - use the reference of settings[aspect] for each object property. Now you can add settings for different aspects by just adding another table entry into the settings table ( i.e. 16x9, etc.. ) with their own values to adjust object positioning for that aspect. You could even add other values that you might want to change depending on the aspect.
I hope this helps you and others understand how to make supporting multiple aspects easier - if you need help, just let me know!