In my layout this code works perfectly:
// Hand Held
local artwork = fe.add_image("hh/[Emulator].png", flx*0.52, fly*0.4, flw*0.260, flh*0.462);
artwork.preserve_aspect_ratio = true;
// Boxart
local box = FadeArt("boxart", flx*0.52, fly*0.6, flw*0.130, flh*0.231);
box.preserve_aspect_ratio = true;
box.trigger = Transition.EndNavigation;
But if I add these modifications ("Watch & Game" is an emulator), it does not work:
local myboxart = "[Emulator]";
if (myboxart == "Watch & Game")
{
// Boxart
local box = FadeArt("boxart", flx*0.52, fly*0.6, flw*0.130, flh*0.231);
box.preserve_aspect_ratio = true;
box.trigger = Transition.EndNavigation;
}
else
{
// Hand Held
local artwork = fe.add_image("hh/[Emulator].png", flx*0.52, fly*0.4, flw*0.260, flh*0.462);
artwork.preserve_aspect_ratio = true;
}
Could someone tell me what I'm doing wrong?
Thanks in advance.