Added proof of concept for filtering
Hey SiegeEngineers,
Thanks for all your work on this project so far. It's the best aoe2 tech tree on the internet for sure.
This PR is a proof of concept to add a filtering mode which allows users to quickly answer questions like "Which civs have Arbalest, Thumb Ring, and Heavy Cav Archer?". Normally that would require looking at three separate tooltips' advanced stats and discerning the union of highlighted civs. Not so easy at a glance:
I figured it'd be easier if I could just click on all the techs I was interested in and see one list of civs that have access to all of the selected filters.
You can see a quick example of filtering in this gif below:
I don't think the level of design/polish here is anywhere close to being ready to merge, but figured I'd put it up to generate discussion and see if this is the kind of feature that would fit into this app. If not, perhaps it'd be something I could contribute as a separate site for SiegeEngineers.
Cheers!
Sorry I have not gotten back to you on this, my August has been pretty busy. Your demonstration looks quite neat! I hope I can find time to check it out in more detail in the coming days.
After having a proper look, some things to consider:
- I think you don't actually need the data in
filtertechtrees. Isn't that just a repeat of the civ data? When you click on a unit caret, you should be able to check for civs that have the numeric ID in their units list. - The tech tree is built to use the full available height if I recall correctly. So when you add a bar at the top, I imagine you'll be spawning a scrollbar at the side. Maybe that can be avoided somehow