Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: Yaron2019 on August 26, 2019, 10:58:26 AM
-
The following code is supposed to fade out an entire list box, but the current selection in the list doesn't fade. What am I doing wrong?
local lb = fe.add_listbox( flx*0.385, fly*0.09, flw*0.31, flh*0.4 );
lb.rows = 25;
lb.align = Align.Left;
lb.set_rgb(0,255,0);
lb.set_sel_rgb(0,255,0);
lb.charsize = 22;
lb.bg_alpha=0;
lb.selbg_alpha=0;
lb.rotation = -3;
function transition_callback( ttype, var, ttime )
{
switch ( ttype )
{
case Transition.ToNewSelection:
local animConfig = {
property = "alpha",
start = 255,
end = 0,
time = 1000
}
animation.add( PropertyAnimation( lb, animConfig ) );
}
return false;
}
fe.add_transition_callback( "transition_callback" )
You can see the problem here:
https://www.youtube.com/watch?v=uxk2fKhXQjo&feature=youtu.be
-
just put code in new theme..to test....and i love it,
dont have an answer though... ill fart around with it...and see
this will be a great code snip... once its figured out...thanks
note: i have had shit not pan out before because of animation module .... by far not perfect..
could be a bug.. im hoping not, it all looks right.
-
fix..... http://forum.attractmode.org/index.php?topic=3042.0 (http://forum.attractmode.org/index.php?topic=3042.0)
-
Try putting the list (lb) on a surface then hide the surface via animation or code, make the trigger for visibility up and down keys.
-
Thanks! both solutions work.