Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: jedione on May 12, 2019, 03:53:44 PM
-
so lest say i set my theme to 4:3
fe.layout.width=640;
fe.layout.height=480;
local flw = fe.add_text( "", 0, 0, 640, 480);
flw.set_bg_rgb( 170, 0, 21);
when i open AM it fills the whole screen even it i stretch it out horizontally,
is their a way. to set AM to open to the correct size, short of punting it on the monitor i want and making it full size?
should i just put in on a layer, havent tryed, to see it.. just some advice would be nice... alwas used to using
variables ie: flx*0.200; kind of one size fits all......
-
My method: use native window size and resize a surface that contains all child objects. My helpers module has an aspect function.
-
me ading a surface....thats all
so this is what i tryed,, would this be right?
fe.layout.width=640;
fe.layout.height=480;
local surface = fe.add_surface( 640, 480 );
surface.x = 10;
surface.y = 10;
local text = surface.add_artwork( "snap", 0, 0, 620, 460 );
(http://i66.tinypic.com/24fec2g.png)
-
it would be great if you could elaborate on "My helpers module has an aspect function."
i have used the module to load your theme, but not 100% on what its doing, that AM lacks ,,because
imlost when it comes to this topic,,, though i did look up an aspect to pixel ratio,, that might help
in short would like to make some themes just for vertical...and want to go abought it in the best way posible...ya know
how would you go abought it,, to still be user friendley,, cross the board?
-
it would be great if you could elaborate on "My helpers module has an aspect function."
i have used the module to load your theme, but not 100% on what its doing, that AM lacks ,,because
imlost when it comes to this topic,,, though i did look up an aspect to pixel ratio,, that might help
in short would like to make some themes just for vertical...and want to go abought it in the best way posible...ya know
how would you go abought it,, to still be user friendley,, cross the board?
I just re-read your original question. Kids and wife screaming, so I mis-read. I would think that your original method would work. Perhaps add fe.layout.preserve_aspect_ratio=true;
?
My suggestion I recommended was because I mis-read and thought you wanted to utilize multiple aspect ratios. My helpers module, I wrote the following method that pertains to this scenario. Of course, you could do the math yourself, but thats why I wrote a function. I use it so my themes look fine in native aspect and can force a 4x3 window, as well as certain design elements maintaining a certain aspect ratio.
// Match Aspect Ratio
matchAspect(aw, ah, dimension, param, obj=null)
-
ok thanks bo....... good looking out,
fe.layout.preserve_aspect_ratio=true; ohh ya,, yes for some reason for got that , thought use it all the time.... peace and thank you..
-
(http://i68.tinypic.com/vsgxg5.png)
working..and off...
-
if it were done or resized in 4:3,, witch it is not ,,,,cool beans case closed, watson