Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: kent79 on June 10, 2021, 12:25:11 AM

Title: Easy way to display number of games & system history in display menu
Post by: kent79 on June 10, 2021, 12:25:11 AM
I would like to share my experience. It is a tricky way to display number of game or system history by text

Below is the code & you may find the example in my Theme. Thanks.
http://forum.attractmode.org/index.php?topic=3917.0

Code: [Select]
local emu_text = fe.add_text( "", 100, 100, 200, 200 );

fe.add_ticks_callback( this, "update_info" );

function update_info( ttime )
{
switch ( fe.game_info( Info.Title ))   {
            case "MAME":
               emu_text.msg = "this is a test 1";
               break;
            case "PLAYSTATION":
               emu_text.msg = "this is a test 2";
               break;
         }
}
Title: Re: Easy way to display number of games & system history in display menu
Post by: jedione on June 14, 2021, 07:00:54 AM
u are a jem.........thank you ....