Author Topic: How to determin if the current game is a member of a tag group?  (Read 1753 times)

millercentral

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Can anyone suggest a way to tell in a layout.nut or plug-in if the currently selected item in a romlist has been tagged (for example as a favorite, or with a custom tag)? I can't seem to figure out how to do this...

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 391
    • View Profile
Re: How to determin if the current game is a member of a tag group?
« Reply #1 on: April 20, 2015, 11:12:28 PM »
Hey there, to get an array of the tags for the current selection, do something like:

Code: [Select]
local tags = split( fe.game_info( Info.Tags ), ";" );

to check if a game is a favourite, you can use:

Code: [Select]
if ( fe.game_info( Info.Favourite ) == "1" )
{
   // ...
}

cheers

millercentral

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: How to determin if the current game is a member of a tag group?
« Reply #2 on: April 21, 2015, 09:10:02 AM »
Fantastic, thanks!