Te subo el codigo en el layout basic para q pruebes.
Para q esto funcione en tu romlist tienes q tener category con su informacion.
Category
Sports / Track & Field
Maze / Driving
Electromechanical / Reels
Maze / Shooter Small
Sports / Basketball
Electromechanical / Reels
Sports / Amer. Football
System / BIOS
Si el juego no contiene "vertical" o "shmup" en este apartado te mostrara el horizontal.png en caso contrario el vertical.png
//////////////////////////////////////////////////
//
// a class that displays images according to
// data found in the emulator game list e.g: ersb
// graphic based upon name in a game list
//
//////////////////////////////////////////////////
class changingImage
{
mode = 1; //0 = first match, 1 = last match, 2 = random
supported = null;
folder=null;
infoType=null;
ref = null;
constructor( image, sup, f, i )
{
supported = sup;
folder= f;
infoType= i;
ref = image;
fe.add_transition_callback( this, "imagetransition" );
}
function imagetransition( ttype, var, ttime )
{
if ( ttype == Transition.ToNewSelection || ttype == Transition.ToNewList )
{
local cat = null;
if (infoType==Info.Tags)
{
cat = " " + fe.game_info(infoType, var);
} else {
cat = " " + fe.game_info(infoType, var).tolower();
}
local matches = [];
foreach( key, val in supported )
{
foreach( nickname in val )
{
if ( cat.find(nickname, 0) ) matches.push(key);
}
}
if ( matches.len() > 0 )
{
switch( mode )
{
case 0:
ref.file_name = "images/" + folder + "/" + matches[0] + ".png";
break;
case 1:
ref.file_name = "images/" + folder + "/" + matches[matches.len() - 1] + ".png";
break;
case 2:
local random_num = floor(((rand() % 1000 ) / 1000.0) * ((matches.len() - 1) - (0 - 1)) + 0);
ref.file_name = "images/" + folder + "/" + matches[random_num] + ".png";
break;
}
} else {
ref.file_name = "images/" + folder + "/horizontal.png";
}
}
}
}
// Genre
local genre = {
//filename : [ match1, match2 ]
"vertical": [ "vertical", "shmup" ],
}
local genre_image = fe.add_image("images/genre/horizontal.png");
genre_image.x = 0;
genre_image.y= 0;
changingImage( genre_image, genre, "genre", Info.Category );