Attract-Mode Support Forum
Attract-Mode Support => General => Topic started by: wildpumpk1n on April 10, 2019, 08:07:04 AM
-
Hello guys,
I come to you to find some help.
I made a layout with image, snap, etc and a conveyor wheel with images.
I used flyer of the games as images and it works no problem.
I would like to put a generic flyer for the games who missing it.
I did this :
if ( my_config["enable_flyer"] == "yes" )
{
local my_strip = SimpleArtStrip( "flyer", 5, 0, fe.layout.height/1.37, fe.layout.width/1, fe.layout.height/4.6, 5 );
}
else
{
local clogos = fe.add_image("Splashscreen_lite.png", 0, fly*0.708, flw, flh*0.02 );
clogos.trigger = Transition.EndNavigation;
}
If you have any idea whats wrong with my code it could be awesome :)
Regards,
Wild.
-
You are using an if statement referencing a config option. I think that is why you dont see it. You could try adding an image to your snap path called snap.png?
-
You are using an if statement referencing a config option. I think that is why you dont see it. You could try adding an image to your snap path called snap.png?
Hey, thanks for your answer.
Maybe if i put all the part code it could be more easy to understand
class SimpleArtStrip extends Conveyor
{
m_x=0; m_y=0; m_width=0; m_height=0; m_x_span=0; m_y_span=0;
constructor( artwork_label, num_objs, x, y, width, height, pad=0 )
{
base.constructor();
local my_list = [];
for ( local i=0; i<num_objs; i++ )
my_list.push( SimpleArtStripSlot(this,artwork_label) );
set_slots( my_list );
m_x=x+pad/2; m_y=y+pad/2;
if ( width < height )
{
m_x_span=0;
m_y_span=height;
m_width=width-pad;
m_height=height/m_objs.len()-pad;
}
else
{
m_x_span=width;
m_y_span=0;
m_width=width/m_objs.len()-pad;
m_height=height-pad;
}
reset_progress();
}
};
if ( my_config["enable_flyer"] == "yes" )
{
local my_strip = SimpleArtStrip( "flyer", 5, 0, fe.layout.height/1.37, fe.layout.width/1, fe.layout.height/4.6, 5 );
}
else
{
local my_strip = fe.add_artwork("snap.png", 0, fe.layout.height/1.37, fe.layout.width/1, fe.layout.height/4.6 );
}
But maybe its not the best way to do that.
I just copy and arrange some code i found, i'm not a dev' to be specific.
-
Are you trying to use the class with snap.png as a param? Check your if statement.
-
simply put just drop your .png .jpg in the layout file
and call them what they are ie: snap, marquee, video, ext...
-
Are you trying to use the class with snap.png as a param? Check your if statement.
simply put just drop your .png .jpg in the layout file
and call them what they are ie: snap, marquee, video, ext...
Thanks to you guys... I complicated the thing and it was just under my eyes :D
Thanks again, just put a flyer.png in layout folder and remove all my mess.