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

[Feature Request] Huds documentation/example #75

Open
Username404-59 opened this issue Jul 14, 2020 · 1 comment
Open

[Feature Request] Huds documentation/example #75

Username404-59 opened this issue Jul 14, 2020 · 1 comment
Labels
question Further information is requested

Comments

@Username404-59
Copy link

Is your feature request related to a problem? Please describe.
I really like this library, it allows me to create guis quite easily, but the current documentation does not include a section on huds :/
I have already managed to create a hud that displays a widget on the player screen, but regarding how to set the position etc i'm struggling 😅.
I think it's worth noting that i'm using kotlin.

Describe the solution you'd like
Just adding an example or a tiny category about these huds would be enough.

@Username404-59 Username404-59 added the enhancement New feature or request label Jul 14, 2020
@Juuxel Juuxel added question Further information is requested and removed enhancement New feature or request labels Jul 15, 2020
@Juuxel
Copy link
Member

Juuxel commented Jul 16, 2020

Hmm yeah, I do need to work on docs. This is how you'd add a HUD widget:

val button = WButton(LiteralText("my button"))
CottonHud.INSTANCE.add(button, /* x: */ 10, /* y: */ 10, /* width: */ 40, /* height: */ 20)

(don't add buttons, though; you can't click them 😉)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants