SkyHanni icon indicating copy to clipboard operation
SkyHanni copied to clipboard

Improvement: Custom Scoreboard Refactor

Open j10a1n15 opened this issue 8 months ago • 61 comments

What

This Pull Request cleans up and refactors the whole Custom Scoreboard. It switches from enums with displaypair getters to abstract classes of each entry, and many more changes. Also uhh yes these are a few additions, we are sorry hanni <3. More changes to improve performance are planned for a later PR.

Images
Text alignment

image image

Changelog Improvements

  • Add option to align the text in Custom Scoreboard. - Empa, j10a1n15
  • Improved overall performance when using Custom Scoreboard. - Empa, j10a1n15
  • Add the Party Leader to the Party Element in Custom Scoreboard. - j10a1n15
  • Separate title and footer Alignment in Custom Scoreboard. - j10a1n15
  • Add Custom Alpha Footer. - j10a1n15

Changelog Technical Details

  • Add SizeLimitedCache and SizeLimitedSet. - Empa
  • Removed the deprecated pattern functions inside StringUtils. - Empa
  • Refactored Custom Scoreboard. - Empa, j10a1n15
    • Abstracted each Element/Event into a different class extending ScoreboardElement, for a more modular design.
    • Made it possible to declare Elements in different ways, like for example just strings or list of strings.
    • Optimized various Elements to use Widgets or already stored values.
    • Optimized by only checking elements that can be shown in the current island.
    • Optimized Unknown lines handling by storing recently checked lines in a SizeLimitedSet.

j10a1n15 avatar Jun 26 '24 20:06 j10a1n15