1
Scripting / Fetch orientation from list
« on: July 23, 2015, 03:46:18 AM »
I'm trying to build layout that can stretch image according to game aspect orientation ie. stretch on area 256x224 or 224x256. Question is, how I can get this variable from list, how can I use it?
There was similiar problem http://forum.attractmode.org/index.php?topic=209.0 but some horizontal screenshots proportions are lower than 1 for example Knuckle Joe so taking image properties and setting stretch according to aspect ratio is not always the best idea.
EDIT. I miss fe.game_info(Info.Rotation), now figure out how to use it.
EDIT. I gave up, I wrote something like this:
local wi;
local he;
function proportions ( wi , he )
if ( fe.game_info(Info.Rotation) == 0 )
{
wi=256;
he=192;
}
else
{
wi=192;
he=256;
}
local t = fe.add_artwork( "snap", 16, 16, wi, he );
t.trigger = Transition.EndNavigation;
but fetching wi and he does not work. Attract mode claims that values are null. What I'm getting wrong ?
There was similiar problem http://forum.attractmode.org/index.php?topic=209.0 but some horizontal screenshots proportions are lower than 1 for example Knuckle Joe so taking image properties and setting stretch according to aspect ratio is not always the best idea.
EDIT. I miss fe.game_info(Info.Rotation), now figure out how to use it.
EDIT. I gave up, I wrote something like this:
local wi;
local he;
function proportions ( wi , he )
if ( fe.game_info(Info.Rotation) == 0 )
{
wi=256;
he=192;
}
else
{
wi=192;
he=256;
}
local t = fe.add_artwork( "snap", 16, 16, wi, he );
t.trigger = Transition.EndNavigation;
but fetching wi and he does not work. Attract mode claims that values are null. What I'm getting wrong ?