I have decided to use 2 layouts, one for menu and one for lists.
Now, if I wanted to return from a display straight into the last viewed system I need to fill and read a global variable.
In my menu layout:
if(::last_display_index){
jumpToSystem(::last_display_index);
}else{
jumpToSystem(0);
}
and in the Emulator/List layout:
::last_display_index = fe.list.display_index;
This kind of declaration must be wrong, because I always get "The index last_display_index does not exist."[/s]
edit:
The solution to this was rather simple...
local sys_index = fe.list.index;
local sys_index_name = fe.displays[sys_index].name;
my "sys_index" controlls the system to show.