Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: bjose2345 on March 01, 2017, 05:29:17 PM
-
Thanks for stopping to read my question, to avoid delays I will go straight to the point :
As you can see in the attached picture, i need to know what is the name of the effect where the image is not covered when putting the blue frame on top, any idea where i can start, im trying to search around, but im very new in AM and still there a lot of things i need to learn.
again thanks for your time and stopping by :D
hmmm.. maybe chaging the set_rgb of the container making it a bit darker in the Transition? ???
-
I'm not sure what you are asking - do you just want to make the blue frame 'invisible'? You could set the alpha to 0 to make it not visible and set it to 255 to make it visible.
-
Thanks for the reply liquid8d, and i feel terrible sorry, my english its no the best to be able to explain what I need :'(
What I am looking for is how to put an image always on TOP of any other (in this case the boxart) even if i move the blue frame over it ...
Thanks again for the reply
-
Ok i think i have it, it has something to do with the zorder property of fe.image class
this could be OK?
m_art= fe.add_artwork( "flyer", 0, 0,width, height );
m_art.zorder.set(9999);
Thanks ;D
-
No problem! Yes, you can use zorder now I believe also, but just the order you draw your objects will place the last object on top. So create the artwork object, then create the border image, it will be on top :)
-
Thanks liquid8d, yeah you are right, the zorder doesnt work :'(
it goes by the draw order, i create first the the artwork object, then later i create the frame image, so the frame its always on top ...
there is a way that i can pass to the conveyor an image in the constructor?
for example im using the grid theme as reference for this...
for ( local i=0; i<rows*cols; i++ )
my_array.push( MySlot( i ) ); --> here we create the slot tha are show in the conveyor
then i create the frame
gridc.frame=fe.add_image( "frame.png", width , height , width , height );
i can pass later to MySlot class an image? any idea please ...
somehting like (sorry im pretty new with squirrel and I do not know very well the syntax)
foreach(a in my_array)
a.m_wheels = fe.add_artwork( "flyer", 0, 0, width, height);
thanks again ;D
-
If you want to put a blue frame on top of game tile without covering the game artwork - simply make that blue frame as transparent PNG image with the cutout (window) so you can see the game artwork through that cutout.
-
Thanks verion, I already made it work, the cutout window has a problem, not all images follow a default size,
But It worked doing what I said before, after creating the Slot array (im place a surface inside the class) and made a foreach to fill that surface with the fe.add_artwork
here is the code snip
for ( local i=0; i<rows*cols; i++ )
my_array.push( MySlot( i ) ); //here we push create the slot class inside the array and draw only the container
gridc.frame=fe.add_image( "frame2.png", width * 2, height * 2, width - 5, fe.layout.height / 3 ); //here we draw the blue frame
foreach(val in my_array){
val.m_wheels = fe.add_artwork( "flyer", 0, 0, width - 8*PAD, height - 24*PAD); // here we fill the container with the flyer or boxart
val.m_wheels.preserve_aspect_ratio = true;
}
many thanks guys, each day i love more coding in AM ;D
-
I know zorder was added more recently, but I think it should work - I just haven't messed with it.
Hey FYI, if the images are different sizes, you can try using the PreserveArt module, which can fill the space and preserve the aspect.. which can work nicely for flyers and boxart and such..
-
Thanks liquid8d, in this particular case doesnt work for me (the zorder) maybe it work in another situation and yes preserve_aspect_ratio its pretty awesome.