mickelson / attract

A graphical front-end for command line emulators that hides the underlying operating system and is intended to be controlled with a joystick or gamepad.
http://attractmode.org
GNU General Public License v3.0
393 stars 115 forks source link

Favourite not working correct with group clones without a filter. #751

Open DJ-Dingo opened 1 year ago

DJ-Dingo commented 1 year ago

Hey [Developer/Team],

I've encountered an issue with the "group clones" feature in Attract Mode, specifically in relation to the favorites function.

  1. Issue with All Games Filter: When I select the "all games" filter (or no filter to view all arcade games) and have the "group clones" feature enabled, the favorites function seems inconsistent. I can add the primary game or the grouped game to my favorites, and it works initially. However, if I switch to another .nut theme or restart Attract Mode, the favorite marking for that game disappears.

  2. Behavior with Good Games Filter: Interestingly, if I apply the "good" filter to display only working games, the favorites function behaves as expected and retains the favorite marking even after a theme switch or restart.

Given this behavior, I have a few questions:

Is this a known bug, or have I possibly misunderstood how the favorites function interacts with the "group clones" feature?

Additionally, when using "Group Clones", how can I show the entire group as a favorite if only a clone (and not the primary "parent" game) has been marked as a favorite? Is there a function such as 'isGroupedGame' or something similar?

Note:

Here's a brief snippet of how I'm displaying '1' and an 'Icon' for the favorite status in my theme..., just for reference,

// Show '1' if game is Favourite
local Favourite = fe.add_text( "[Favourite]", flx*0.317, fly*0.2974, flw*0.42, flh*0.027 );
Favourite.set_rgb( 255, 247, 3 ); 
Favourite.align = Align.Left;
Favourite.rotation = 0;
Favourite.font = "digital-7";
//Show 'Icon' if game is Favourite
function FavStar() {
    if (fe.game_info(Info.Favourite) == "1") {
        return "ball-icon-png-4626.png";
    }
    return "";  // Return an empty string if it's not a favorite
}
local fav_image = fe.add_image("[!FavStar]", flx*0.211, fly*0.2974, flw*0.023, flh*0.037);

Thank you for your time and assistance.

Best regards, [DJ-Dingo]