Tried to show a "favorite" icon on my layout.
::OBJECTS <- {
fav = fe.add_image( "favorite.png", 5, 55, 60, 60 ),
}
OBJECTS.fav.visible = false;
function show_favorite( ttype, var, ttime ) {
switch ( ttype ) {
case Transition.ToNewList:
case Transition.ToNewSelection:
local inf_fav=fe.game_info(Info.Favourite);
if (inf_fav=="1")
OBJECTS.fav.visible = true;
else
OBJECTS.fav.visible = false;
break;
}
return false;
}
fe.add_transition_callback( "show_favorite" );
The thing is the icon only shows "on layout start" and if I change the selected game , shows if I have the previous or the next game selected.
I mean . if I have three games, 1, 2, 3
2 is tag as favourite
If I move to 3 , the favourite icon is showed , same with 1 , but not with 2
Only if I start the f.e. with the 2 game previously selected.