Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI Library TODO #52

Open
2 of 3 tasks
TheGlitch76 opened this issue Nov 19, 2021 · 2 comments
Open
2 of 3 tasks

GUI Library TODO #52

TheGlitch76 opened this issue Nov 19, 2021 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@TheGlitch76
Copy link
Contributor

TheGlitch76 commented Nov 19, 2021

This is a list of the Fabric API modules that need to be ported to QSL for the gui library. Feel free to make a PR for any module in this list, though consider discussing your port in the Toolchain Discord first.

The new module should have the same core features as the Fabric equivalent, but refactors, reorganizations, or expansions in scope are allowed.

Please leave a comment if this list is incomplete or missing a Fabric API module that was added past when the original QSL RFC was written.

If you are interested in becoming a maintainer for this library, please contact the QSL Core team on the Toolchain Discord!

@TheGlitch76 TheGlitch76 added good first issue Good for newcomers help wanted Extra attention is needed labels Nov 19, 2021
@i509VCB
Copy link
Contributor

i509VCB commented Jun 29, 2022

I guess I have a bit of wisdom to add to this topic regarding the hud (which is probably gui by category).

The biggest issue I recall around this discussion was tracking what is essentially a tree of elements to draw.

What I'd like to propose is an abstraction around a scene graph:

A scene graph is optimal for the hud imo for a few reasons:

  • A scene graph represents drawable elements with scene nodes
  • Each scene node inherits the render state of the parent and can apply transforms to their children.
  • Scene graphs make ordering draw operations something you can do before rendering, effectively forming a linear queue of elements to draw.

There is some existing precedent in Minecraft for something like this with the MatrixStack. The MatrixStack effectively acts like a scene graph for transforms.

@xanderstuff
Copy link

xanderstuff commented Nov 19, 2022

The biggest issue I recall around this discussion was tracking what is essentially a tree of elements to draw.

Something similar exists to what you are describing, if I'm understanding that correctly. Both @Burgerguy's HudTweaks and my UltimateHUD mods add an abstraction layer to the hud, organizing things into a tree of Elements/Widgets, where the state (position and size) of parents affect their children's position (according to how the child wants to be positioned relative to its parent).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants