Grid tile content (image, text, or more ...)
-
You can find my latest proposition regarding the theming syntax on GitHub. This is what the theming syntax which will be used in the V1 of the grid view, so it may be extended by the future, and small adjustments may still be done before.
Does it look good to you ?
Is the syntax explicit and easy to understand ?
Is the way the different elements are handled between default (unselected) tile and selected tile make sens ?https://github.com/RetroPie/EmulationStation/issues/206#issuecomment-379541647
-
@ectoone Thanks for the explanations, I will give it another look later on and try this scraper, along with taking a look to the code to see if I can do something about your issues. Basically just saying I'm not ignoring your nice answer, but right now all my focus is dedicated to finishing the first version the grid view.
-
Hi, looking good with what you've done so far! keep up the good work!
I was just wondering, like @EctoOne mentioned regarding the selection of image (image/marquee), is this going to be selectable when theming?
Also, can it be used vertically (one (single) column)?
And last of all....is it a separate element to everything else (video tag, marquee tag, image tag, gamelist tag etc)?Cheers! :)
-
@paffley Yes it can be used with one single column.
Technically you can also have one single row, but the behavior will be weird, as the grid can only scroll vertically right now, but I've planned to allow the theme to change the scroll orientation (vertical by default, horizontal as an alternative), if that doesn't add too much complexity to the code and/or many people can find a good usage to that.
About your second question : no the grid view doesn't support video as I said numerous times, but that may changes in the future if we merge all the views (basic, detailed, video and grid) into one single, modular game view. But that isn't for today nor tomorrow.
gamelist tag etc)?
Even if we do what I said, that won't be allowed, you can't select games using both the image grid and the text list, since they have different controls, you will have to make a choice in your theme regarding that point.
-
@ectoone Also wanted to say some changes you requested may look straight forward, but they are not.
For example, adding md_title to all the view will break all the available theme, because to be consistent with other metadata, the md_title will be shown if the theme don't specify it position to offscreen.
I just can't break all the available themes and ask them to update it every time I change a small thing like that.
On another hand, if I do a complete refactoring of the game list views, to merge all this mess into a single, modular game list view, then I will answer most of your concerns in one single time and may ask the theme makers to update their theme to this new, stable and easier to maintain theming syntax.
-
@clyde Thanks for the suggestion, I probably won't try/use it because I already have gamelists/media for all my games (and barely add anything new, and if I do it's a Romhack anyways) but maybe I just take a look for fun.
@A12C4 The proposition looks easy enough to me, although I have some questions: What are
<backgroundColorCenter>
and<backgroundColorEdge>
exactly doing? Is that some kind of gradient or is<backgroundColorEdge>
supposed to be some kind of tile border?And once again, I'm grateful of what you're doing and I know how important grid view is to you (at least I've seen on github that you wanted to get this out as soon as possible) don't ever feel pushed by me or anybody to add something just because they want it. ES does look good enough and it can run games. That's good enough for me.
PS: I remembered where I wanted
<md_name>
as element, it was for my Invaders Theme. I wanted to use the gamelist to be the Invaders, to have the option to move them up/down manually. Because the Invaders are a font, there was no way to see the selected game name and i had to use<md_description>
as the Invaders.
Point is, (no offense) just because something doesn't make sense to you, somebody might be able to make something nice out of it if he/she has the option to try it out. So don't take away (simple?) things. :) -
@a12c4 Looks good to me. But will there be a way to control the numbers of rows and columns?
-
@lilbud good question actually. i assumed that the numbers where defined by the grid size so that it adapts to various screen resolutions.
-
The proposition looks easy enough to me, although I have some questions: What are <backgroundColorCenter> and <backgroundColorEdge> exactly doing? Is that some kind of gradient or is <backgroundColorEdge> supposed to be some kind of tile border?
<backgroundColorEdge> is the tile border, not a gradiant, but you can still insert a gradiant manually in the image you use as the tile background. I need to try it out, but it shouldn't render badly due to the way the background is resized (the background image is splitted in 9 part so the corners don't get distorted and the borders are only distorted on one axis, only the center is completly distorted but should be hidden by the game image). As I said I need to try it out to be sure.
Point is, (no offense) just because something doesn't make sense to you, somebody might be able to make something nice out of it if he/she has the option to try it out. So don't take away (simple?) things. :)
I still have to make design choices somehow, and not supporting a feature which have no use case allow lighter and easier to maintain code. That's why I wanted to open the debate to more people and created this post on the forum, so I can have more feedback and maybe reconsider some design points due to new informations.
-
@lilbud This is where the fun begin, I hope you like maths :)
The number of rows and columns depend on the grid size, its margin, and the default grid tile max size.
The formula is the following :
GRID_SIZE = COLUMNS * TILE_SIZE + (COLUMNS - 1) * MARGIN
(same formula for the rows, note the "COLUMNS - 1" as we always have one less margin than column)Let's say you want a grid which take 80% of the screen, and 4 columns and rows.
The grid size will be 0.80 0.80 and we have 4 columns, this leave us with the following formula :
0.80 = 4 * TILE_SIZE + 3 * MARGINWe want to add small margin so the tiles are not too close to each others, let's say 0.03
So if I take back last formula and replace the margin with its value, this give us :
0.80 = 4 * TILE_SIZE + 3 * 0.03
<=> 4 * TILE_SIZE = 0.80 - 3 * 0.03
<=> 4 * TILE_SIZE = 0.71
<=> TILE_SIZE = 0.1775I hope you like it, this is @jdrassa idea :)
EDIT : Also note that this is just the tile size, the image will adapt to the tile size (minus the padding) but keep it aspect ratio, and the background fit the image size (plus the padding). I will post a screenshot of it later today so you can better see what I'm taking about.
-
@a12c4 said in The Grid View need your opinion:
For example, adding md_title to all the view will break all the available theme, because to be consistent with other metadata, the md_title will be shown if the theme don't specify it position to offscreen.
md_title could be added to other views without breaking any existing themes. The key to preventing it from effecting existing themes would be to specify a default position in the code that is already off screen.
-
@jdrassa said in The Grid View need your opinion:
md_title could be added to other views
Do it. Seriously a lot of themes could benefit from it.
-
@jdrassa Which would bring inconsistent behavior as it's the only metadata positioned offscreen by default.
Not that this is a big deal by itself, but the code related to the game views is already so fcked up, I would prefer not adding another thin layer of complexity to something that is already a giant mess.
While a unique and modular game view would solve both this problems (messy code and different metadata) at the same time.
EDIT : What about md_marquee ? What about md_image ? Should we really spend time duplicating code all around instead of refactoring as this should have been done a long time ago ? I don't think so and I don't want to do that, if you want to, then go ahead and do it, but I don't support that.
-
https://github.com/Koerty/es-theme-material
Wasn't the background color of the selected tile blue before ? Maybe it changed because I use different default values.
https://github.com/Koerty/es-theme-moderntv
This one look super bad because you set the path of the background to :
<path>/home/pi/RetroPie/splashscreens/modern/bg.png</path>
This is an absolute path and I don't have the image. Unless I missed something and the image is installed somehow with your theme, you should add the image to the git repository and set the image path with a relative path.
-
@a12c4 You gotta add your own image. I designed the theme so that any image can be used, but the user has to supply the image.
-
@lilbud Then from where the image you used in your screenshots come from ? The blue and orange image with sky buildings
I want to compare to see if there is any difference.
-
-
@lilbud Thank you a lot !
Original for comparison
My version
So, as expected, the game title isn't here because not implemented yet.
Beside that, on the original image, is the "white space" under the selected tile something you wanted to do on purpose ? Or was it just the space where the text, which is hidden, belong.
Because right now I'm centering the background with the image, so if people want to do something like that, with one of the side of the selector bigger than the others, they can't.
EDIT : I'm not sure but I think the tiles are slightly bigger in my case, I need to check something.
-
I give a bit more importance to keeping it simple for the user over keeping it simple for the developers.
Someone said this recently in an unrelated PR and I think it applies here as well. A little bit of code duplication would simplify things for users and theme developers.
@a12c4 said in The Grid View need your opinion:
While a unique and modular game view would solve both this problems (messy code and different metadata) at the same time.
This is true, but there is no guarantee this will happen anytime soon. When video support for first added, there was discussion about adding md_marquee to detailed view. The reason we didn't at the time was because their was discussion about overhauling the game view that would fix this "right way". Nothing ever came of it and support for md_marquee was never added to detailed view.
@a12c4 said in The Grid View need your opinion:
EDIT : What about md_marquee ? What about md_image ?
Ideally we should have consistent metadata available to all views.
@a12c4 said in The Grid View need your opinion:
Should we really spend time duplicating code all around instead of refactoring as this should have been done a long time ago ? I don't think so and I don't want to do that, if you want to, then go ahead and do it, but I don't support that.
Look I was not saying that you had to implement
md_name
support in all views, I was just pointing out that it was possible to do so without breaking existing themes. That being said, your statement about why you don't want to do it, could apply to the grid view in general. There was a bunch of code duplication involved. Maybe you should have held off until everything was refactored into the perfect solution. Maybe we should have rejected some of your PRs for the same reasoning. You didn't and we didn't. This just seems like a wierd arbitrary point to decide to draw the line. -
@a12c4 said in The Grid View need your opinion:
Beside that, on the original image, is the "white space" under the selected tile something you wanted to do on purpose ?
I honestly don't remember, its easily been years since I worked on this theme, or with gridview at all.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.