Skyblocker icon indicating copy to clipboard operation
Skyblocker copied to clipboard

Rabbit collection

Open Emirlol opened this issue 8 months ago • 3 comments

Adds extra information to the tooltip of the hoppity's collection item to indicate how many of the rabbits you're missing, per rarity.

~~This PR is based on the api-changes branch.~~ Merged to master, so no need to mention anymore

A list of things I've done:

  • Changed around the ProfileUtils class a bit to fit my use case, which needed to support profile changes as the rabbit collection depends on the profile json to display the data.
  • Added a new event as a result of the previous change - PROFILE_CHANGE - that is fired upon receiving the profile changed message in chat.
  • Added a TooltipComponent type that allows for aligned text by appending the specified text at a certain x position relative to the previous text's starting position. There's also a method that allows chaining these for a grid-like display. These are all interface-injected into MutableText, so their usage is very simple and there's javadocs to help explain them.
    • This can refactored later to specify a width and anchoring position for the aligned text for finer-grained control over the text, if there's ever a need for it.
  • Refactored most tooltip adders to make use of the aligned text stuff mentioned above, so they are all aligned with each other.

Images

image image image

Emirlol avatar Jun 19 '24 10:06 Emirlol