Author Topic: Change the favourite state using a function  (Read 2363 times)

zpaolo11x

  • Hero Member
  • *****
  • Posts: 1234
    • View Profile
    • My deviantart page
Change the favourite state using a function
« 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)?

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Change the favourite state using a function
« Reply #1 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.

zpaolo11x

  • Hero Member
  • *****
  • Posts: 1234
    • View Profile
    • My deviantart page
Re: Change the favourite state using a function
« Reply #2 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...

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Change the favourite state using a function
« Reply #3 on: April 15, 2020, 02:24:12 PM »
You could parse attract.cfg.

zpaolo11x

  • Hero Member
  • *****
  • Posts: 1234
    • View Profile
    • My deviantart page
Re: Change the favourite state using a function
« Reply #4 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