Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: zpaolo11x on April 12, 2020, 12:57:35 AM

Title: Change the favourite state using a function
Post by: zpaolo11x on April 12, 2020, 12:57:35 AM
Is there a way to change the favourite state of the current game (or any game) using a function, or the only way is through the "add_favourite" signal (and consequent menu)?
Title: Re: Change the favourite state using a function
Post by: keilmillerjr on April 12, 2020, 02:11:09 AM
You can change confirmation of favorites within attract.cfg. Only other option I can think of would be to change the file directly.
Title: Re: Change the favourite state using a function
Post by: zpaolo11x on April 15, 2020, 05:53:42 AM
You can change confirmation of favorites within attract.cfg. Only other option I can think of would be to change the file directly.

That what I feared... I want to use my own menu to add/remove favorites, my code can call "add_favourite" when needed but if the user has set the confirm delete favorites option it will show the menu anyway.

It would be great to be able to set/remove favorites or tags withing the layout code without using the standard menus...
Title: Re: Change the favourite state using a function
Post by: keilmillerjr on April 15, 2020, 02:24:12 PM
You could parse attract.cfg.
Title: Re: Change the favourite state using a function
Post by: zpaolo11x on April 15, 2020, 02:33:35 PM
You could parse attract.cfg.

To see if the favorite option is set or not? That's a good idea but once I know the user has set the "confirm favorite" that won't help me in preventing the menu from opening :/ But I'll look into this idea more, I didn't thought about that