SpongeAPI icon indicating copy to clipboard operation
SpongeAPI copied to clipboard

[API-8] Expose PaginationCalculator

Open ItsDoot opened this issue 4 years ago • 5 comments

Closes #2138.

ItsDoot avatar Jul 04 '20 06:07 ItsDoot

Also, this could target api-7 as well.

Zidane avatar Jul 04 '20 14:07 Zidane

I think it's worth noting in the documentation that this assumes the vanilla font. In ChatUILib I have FontData which reads a .png to determine character sizes, allowing non-vanilla ascii.png measurements. For unicode characters there's glyph_sizes.bin, though I'm not sure if this is modifiable in a datapack.

simon816 avatar Jul 05 '20 21:07 simon816

Also, to centre text means knowing the width of the chat box. SpongeCommon assumes the default (320), but it is customizable (see https://ore.spongepowered.org/simon816/Chat-UI-Library#player-settings)

simon816 avatar Jul 05 '20 21:07 simon816

I think it's entirely fine that the Sponge Common implementation only supports vanilla content. Perhaps it could be expanded to be able to load data from resource packs and automatically configure based on the server pack, but it is a service and can be replaced by other more customizable implementations.

Another theoretical implementation could integrate with a client mod that passed the necessary sizing and resource pack information to the server,but that would be imo out of scope for sponge itself. However, to make this more friendly to such an implementation, the getCalculator method should probably take a Player parameter?

zml2008 avatar Jul 05 '20 21:07 zml2008

This has sat around for some time - what do we want to do with this?

dualspiral avatar Feb 01 '22 19:02 dualspiral

Hey! You seem to be running an unsupported version (API 8) of SpongeAPI. Support for API 8 ended in October 2023.

API-8 is now end-of-life. We will not be issuing any more API updates for version 8 of our API^1

As part of our legacy cleanup we are closing issues relating to API8/1.16


If you wish to move this forward, please rebase this PR on the current branch and reopen it.

ImMorpheus avatar Nov 03 '23 20:11 ImMorpheus