Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add: Unit Scroller UI Feature #4960
Unit Scroller is a feature largely intended to make it easier for users to ensure they have moved all units. The feature adds UI components to help map to hot keys that will select next and previous units. The scroller features a 'center on current' button and a thumbnail avatar to display the units in the current territory and the name of the current territory.
Notable updates and changes:
Manual Testing Performed
This new feature highlighted and revealed these existing bugs:
A bug in this feature that I found and was not able to work out is rendering on multiplayer games. The initial draw renders too much space for the icons. In this situation the highlight current and sleep buttons are drawn too far above and below the other buttons. But, after a short delay (about half a second) swing recomputes the component sizing and the scroller renders correctly. It's a brief and slightly noticeable problem. Single player perhaps has the same issue but the re-rendering is quite fast and it's not even clear if this is also a problem on single player. Overall this bug is quite minor.
@@ Coverage Diff @@ ## master #4960 +/- ## ============================================ - Coverage 24.11% 24.09% -0.03% - Complexity 6723 6742 +19 ============================================ Files 978 986 +8 Lines 77416 77629 +213 Branches 11631 11635 +4 ============================================ + Hits 18669 18701 +32 - Misses 56603 56783 +180 - Partials 2144 2145 +1
RoiEXLab left a comment
Yup that should be it. A follow-up PR with all the
IMO extracting the territory search to something functional and writing a unit test would be the way to go there. It's more effort than I will volunteer for in favor of other TripleA work. I'd love to see that done nonetheless, but realistically it's perhaps not the best ROI for at least myself right now.