batocera-linux / batocera-emulationstation

MIT License
322 stars 248 forks source link

Themes variables (or assets) for collections? #1091

Closed DivineDominion closed 11 months ago

DivineDominion commented 2 years ago

So I've tried to add background images to custom collections.

Am basing my modifications on the Art Book 4:3 theme.

There, I found the path to the default background image --

        <path>./_inc/systems/default/fullscreen.jpg</path>
        <path>./_inc/systems/fullscreen/${system.theme}-art-fs.jpg</path>

I wonder if there's a way to have a theme variable or otherwise inject collection names to support custom images.

I also found that the custom-collections prefix for background images works, but it's not individual per collection. https://github.com/batocera-linux/batocera-emulationstation/blob/ff6d50cb5c16572420661113e12267a2116c0bba/es-app/src/CollectionSystemManager.cpp#L56

Adding the collection name could be a hack, so collection name wins over system wins over default -- but shipping a hack isn't what I'm after :)

        <path>./_inc/systems/default/fullscreen.jpg</path>
        <path>./_inc/systems/fullscreen/${system.theme}-art-fs.jpg</path>
        <path>./_inc/systems/fullscreen/${collection.name}-art-fs.jpg</path>

Are there other ways to achieve per-collection customization?

fabricecaruso commented 11 months ago

you have dynamic variables now (using {collection:xxxx} dynamic variables )