ES to Pegasus theme converter
Recently I was experimenting with converting EmulationStation themes into Pegasus themes. In Pegasus, a theme can change the whole logic of the user interface, which allows creating very unique looks, but can make themeing more complex compared to ES. However, because ES themes have no moving parts (as in code), in theory it should be possible to convert them into Pegasus themes by doing the same thing ES does when loads themes.
And it turned out to be actually possible; after dealing with all the little nuances of the XML files, all themes are now convertable to Pegasus! There are quite a few things missing yet, but I think the script might be ready for some playing.
The script can be found here: https://github.com/mmatyas/es-pegasus-theme-converter
I've also run it through all (~200) themes available from the RetroPie installer, and uploaded the 50 smallest of them (they are big!) here: https://github.com/mmatyas/es-pegasus-theme-converter/releases/tag/v0.1.0. The XML files have been left there too, so you can load the directory in both ES and Pegasus for testing.
Reading and validating a theme, then generating QML files, setting up the various resources and creating something usable. All converted themes should be functional. "Classic" ES themes should be working mainly fine, with the elements looking mostly as expected. Things are not pixel perfect yet (especially texts) but in some cases it can be quite close.
At the moment there are no theme options in Pegasus yet, so only the 'detailed' view of the ES themes is used. In the future all views will be usable. Other than that, support the following items/features are missing in general:
- help prompts
- carousel styling
- certain gradients and color shifts
- text scrolling
- videos and sounds
- anything undocumented or depending on ES quirks
However, it should be possible to add support for all of them eventually. Mouse and touch support is halfway there too, but not quite 100% yet.
PS. Note that the generated code is ugly and not how a human would write QML files. They should not be used as a learning material in general.
msheehan79 last edited by
Very cool! While I've become a big fan of what is possible with a Pegasus theme, I think being able to convert ES themes to work with Pegasus will make theming a whole lot more accessible than building a theme in QML from scratch.
I know it's still early days, but figured I'd pass along that when I tried loading Pegasus with the 'es-theme-retrowave' theme in the themes directory Pegasus wouldn't start at all - no log file it just wouldn't boot. Moving that particular theme out of the folder and it works fine.
xFJSx last edited by xFJSx
I was looking for some slightly improvements of your project... and found this.
In other words I really like your work. :)
@msheehan79 Are you using the latest version? There was a crash related to themes, but I've just fixed that yesterday.
msheehan79 last edited by
@fluffypillow Thanks - I was using a relatively recent build, but not yesterday's release. That one does seem to have fixed it.
- Added carousel support (the system info bar will also come next)
- Gradients and color shifts now work properly
- Lots of small improvements in the code generation and validation
These make quite a few modern themes now usable:
It will be interesting to try performance of emulationstation vs the pegasus variants