Author Topic: ToDisplay transition?  (Read 121 times)

sickle

  • Full Member
  • ***
  • Posts: 62
    • View Profile
ToDisplay transition?
« on: May 20, 2020, 08:11:20 AM »
to my knowledge, the is no ttype for moving to the "Next display", so I came up with this little snippet of code that should have allowed me to trigger the next display after a video is done playing:

Code: [Select]
function code ()
{
     local staticv = fe.add_image("ui/static.avi",0,0,1920,1080)
     staticv.video_flags=Vid.NoLoop

          if (staticv.video_time==staticv.video_duration)
          {
               fe.signal("next_display")
               staticv.visible=false
          }
}

according to the attract mode programming reference, video_time is the current point at which the video is at (in milliseconds), and video_duration is how long the video is in total (in milliseconds).

so why does this not work, and how could I fix it?
« Last Edit: May 20, 2020, 07:26:41 PM by sickle »

beccobunsen

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: ToDisplay transition?
« Reply #1 on: May 26, 2020, 02:11:00 PM »
you can try to mod this i have used...

Code: [Select]

function hidenoextra( ttype, var, ttime )
{

function overview_exist(fullpathfilename)
   {
   try {file(fullpathfilename, "r" );return true;}catch(e){return false;}
   }
   
 local OVEX = overview_exist("../Attract/scraper/" + fe.game_info( Info.Emulator ) + "/overview/" + fe.game_info(Info.Name) + ".txt");

  if ( ttype == Transition.StartLayout || ttype == Transition.FromOldSelection || ttype == Transition.ToNewList )
    {
 
  if (OVEX == false) sysview.bg_alpha = 0;
  else sysview.bg_alpha = 190;
    }

}

fe.add_transition_callback( "hidenoextra" );

qqplayer

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Re: ToDisplay transition?
« Reply #2 on: May 29, 2020, 12:26:12 PM »