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