mika76 / mamesaver

Mamesaver is a mame emulated screensaver - get all the good ol' games playing their demo modes while you procrastinate and enjoy!
https://mika76.github.io/mamesaver/
MIT License
36 stars 10 forks source link

Enhancement - game filtering #47

Closed nullpainter closed 5 years ago

nullpainter commented 5 years ago

After game list construction, we have enough data from listxml to add the following filters, if users wish to select games in a more controlled fashion:

Another useful thing to filter by wold be category. This would be via catver.ini, but this isn't bundled with MAME. So we could have a button which downloads it (perhaps from here?)

Thoughts?

mika76 commented 5 years ago

I never knew about catver.ini - that's really cool - yeah I love this idea! 💯 ❤️

mika76 commented 5 years ago

So what are you thinking - filter the list with some dropdowns at the top or a button which pops open a filter dialog?

nullpainter commented 5 years ago

I need to have a play. It is nicer if the filter was applied dynamically and was in the same window, but there's very little real-estate (particularly if there are two drop-downs, two input fields, potentially some help text if catver.ini isn't present, and a download button).

nullpainter commented 5 years ago

Here's an example of my PoC thus far. Key points:

I should change the select all / deselect all to be based on the filtered set; currently its over the whole collection.

mameselection

Thoughts? Do you think the checkboxes in the headers are clear enough? The 'standard' approach is to add ugly little funnel icons, with additional indicators to display whether filters are applied per column.

@andyvans, for your inevitable feedback.

mika76 commented 5 years ago

Wow I ❤️ it! I think the checkboxes are fine - although if it's easy you could compare to that filter icon you were talking about. One other thing - I suggest a clear filters button somewhere (maybe on the right side in line with Rebuild List...

nullpainter commented 5 years ago

Updated version:

Even though I was initially reluctant to use a filter icon, there are now an awful lot of checkboxes, meaning subtly different things... I will add filter icons later today or tomorrow.

mameselection2

PS. There isn't anything weird going on with my row colouring; just an artifact of the GIF conversion process.

nullpainter commented 5 years ago

Out of the box styles with this library are... not great. Very easy to customise though. The filter icon itself is alright(ish). I think the dot is meant to indicate that the filter has been applied.

Turns out the sample code was wrapped in a ToggleButton. Just needed to style that guy.

image

What do you think? It's a little less intimidating Checkbox City...

Also, I tried to use a standard Windows style for the alternative rows. Does it look a bit heavy to you, or am I just being far too picky?

mika76 commented 5 years ago

Heh you're as pedantic about UIs as I am 😆 this never ends well hehe

The icons look great but I wonder - could you highlight them (maybe use SystemColors.HighlightColor) when a filter is used? I think they might be more visible - otherwise they are awesome.

I think that the even/odd row coloring is very mac specific and not very Windows personally...

mika76 commented 5 years ago

By the way how are you handling the category xml? Mamesaver downloading itself?

nullpainter commented 5 years ago

Heh you're as pedantic about UIs as I am 😆 this never ends well hehe

No, it's great! It's fantastic to work with someone with opinions - provided they're not diametrically opposed to mine 😉

The icons look great but I wonder - could you highlight them (maybe use SystemColors.HighlightColor) when a filter is used? I think they might be more visible - otherwise they are awesome.

I was wondering that. I'll see if I can coerce the existing styling.

I think that the even/odd row coloring is very mac specific and not very Windows personally...

Easy fix for that!

By the way how are you handling the category xml? Mamesaver downloading itself?

I'm not, yet. The WPF app is currently standalone with dummy data, while I focus on the UI. I was intending for it to be downloaded automatically on first rebuild and perhaps after a 'Refresh category on next rebuild' checkbox on the Advanced tab?

catver.ini is around 330Kb and https://github.com/mamesupport/catver.ini gzips responses, so this automatic approach should be fine.

FWIW, here's the current state, showing an active filter for Manufacturer:

image

mika76 commented 5 years ago

Looks awesome! Is there any way to make the rest of the grid white - looks a bit strange currently - like something's not drawing 😆

Maybe we should take a copy of the category file and include an initial one on install and then allow it to be updated? Otherwise the other way might be to give all the games a generic category until it's downloaded or to hide the category column?

Loving the direction...

nullpainter commented 5 years ago

Is there any way to make the rest of the grid white - looks a bit strange currently - like something's not drawing

Oops, I stopped noticing that! Yes, it's awful and keep meaning to fix.

Maybe we should take a copy of the category file and include an initial one on install and then allow it to be updated?

Not a bad idea. The screensaver isn't too huge. I would like to make the whole process transparent unless users care - an 'update categories' button on the Advanced tab (or goodness, a section in README.md noting the path on disk - how often do these things change?)

This is just a dummy project currently, so I think enough is bedded in now to properly integrate it and migrate the configuration WinForms code?

mika76 commented 5 years ago

sounds good to me

nullpainter commented 5 years ago

Resolved by PR #49