Possibility to embed game info icons within gamegrid tiles. (theme dev)
pajarorrojo opened this issue · 3 comments
Issue description
It would be fantastic to have the ability to use game info icons such as wheel (steering wheel), lightgun, manual, savestate, etc., in the same way we use grid.favorite, grid.marquee, grid.cheevos.. etc. Additionally, these icons would only be displayed if the "SHOW X ICON" option is enabled in the user interface settings.
Thanks!
In this regard, the icons of the options in the screenshot called with the extra binding variables {game:x} (savestate, manual, cheevos, gun and wheel) should be hidden or deactivated by default when those options are unchecked. It's a bit confusing to have icons related to this that don't respond to the main configuration. Those options only work in the detailed view for the icons that appear next to the name in the listing AFAIK.
About the "in the same way we use grid.favorite, grid.marquee, grid.cheevos" : my anwser is NO. It would NOT be fantastic at all !
I created itemTemplating to get rid of all those abominable tricks with hardcoded namings ( like grid.favorite, grid.marquee, grid.cheevos ) using hardcoded and non-extensible controls.
I won't make evolve the static hardcoded namings anymore ( all non extras "md_" things, or "grid.favorite" ).
With ItemTemplating, you can do what you want.
See how it's done in content.xml in the carbon theme, it's the perfect sample for what you talk.
Also, you can "read" the options in the theme and toggle display given the option. It's what is done in content.xml.
It works with dynamic and static variables too.
system
showManual bool
showSaveStates bool
showCheevos bool
showFlags bool
showFavorites bool
showParentFolder bool
showGun bool
showWheel bool
See the documentation here
https://github.com/batocera-linux/batocera-emulationstation/blob/master/THEMES_BINDINGS.md
You can access these options anytime.
There won't be any automatic way to hide what's created with extras ( as it's impossible ).
So, it's now the theme developers responsability to show or hide those elements, given the options.
Okay sir, I had no idea that the showX variables 'read' the options of the UI they refer to. I will do it that way, of course! It might be a good idea to clarify this in the documentation about bindings with a comment next to it ;)
I will investigate how to display the icon within the grid using the new coding