Sparky983 / vision-gui

A minimal GUI API for Paper
http://vision.sparky983.me
MIT License
13 stars 0 forks source link

Vision Elements #163

Open Sparky983 opened 11 months ago

Sparky983 commented 11 months ago

Vision Elements is a seperate project that aims to solve more specific and opinionated issues such as:

This should only require a few changes:

Sparky983 commented 4 months ago

Some of these features would be too disjointed unless integrated directly into the library.

Sparky983 commented 4 months ago

Could this be repurposed to contain only reusable Gui components? e.g. pagination (can't think of anything else)

Sparky983 commented 4 months ago

The required changes are affected by this change in scope.

This should only require a few changes:

  • [ ] Removal of fill and borders - no major change because both are marked with @ApiStatus.Experimental

Probably don't need to go.

  • [ ] GuiLike (or similar) interface?

Depends on if the components have their own APIs?

For example, with pagination, would we have an API like (ignore pagination part of this API, the main thing I'm trying to get across is whether to have GuiLike or simply return a Gui)

public final class PaginatedGui {
    private PaginatedGui() {}

    public static Gui.Chest create(...);
}
public final class PaginatedGui implements GuiLike {
    public static PaginatedGui create(...);

    public void setPage(int page);
}
Sparky983 commented 2 months ago

If we were to choose GuiLike (and presumably ButtonLike), we could do so without changing the type in the new slot methods without breaking the binary or source interfaces (since they aren't stable as of pre 1.1).