Just replace 'size' with 'index '
Something like this, cant test atm
//
//
::OBJECTS2 <- {
system2= fe.add_text("",0, 25, 640, 30)
}
function transition_system2(ttype, var, ttime)
{
switch ( ttype )
{
case Transition.ToNewList:
case Transition.StartLayout:
case Transition.ToNewSelection:
case Transition.FromOldSelection:
local display2 = fe.list.index - 3
OBJECTS2.system2.msg = display2;
break;
}
}
fe.add_transition_callback("transition_system2" );
//
//
P.D. Should be better create a single working function but I think this its better for you to understand how it works
This class is a container for status information regarding the current display. The instance of this class is the fe.list object. This class cannot be otherwise instantiated in a script.
Properties:
name - Get the name of the current display.
display_index - Gett the index of the current display. Use the fe.set_display() function if you want to change the current display.
filter_index - Get/set the index of the currently selected filter. (see fe.filters for the list of available filters).
index - Get/set the index of the currently selected game.
search_rule - Get/set the search rule applied to the current game list. If you set this and the resulting search finds no results, then the current game list remains displayed in its entirety. If there are results, then those results are shown instead, until search_rule is cleared or the user navigates away from the display/filter.
size - Get the size of the current game list. If a search rule has been applied, this will be the number of matches found (if > 0)
So you can use all this properties depending on what you need, I mean fe.list.name, fe.list.size, fe.list.index...